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 发布文章使用:只允许注册用户才可以访问!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/13019790.html
未经授权禁止转载,违者必究!