xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

bind & this & new & arrow function

bind & this & new & arrow function

this


bind


call


apply


new


arrow function


arrow function only bind this, when it was created context;

You can't rebind this in an arrow function. It will always be defined as the context in which it was defined.

https://stackoverflow.com/questions/33308121/can-you-bind-this-in-an-arrow-function

can't change this, but can bind args

refs

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_objects/Function/bind

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions



©xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


posted @ 2020-05-31 16:53  xgqfrms  阅读(167)  评论(6编辑  收藏  举报