all-of-javascript
all-of-javascript copied to clipboard
箭头函数的 this 指向
这个问题本身就是一个错误的问题。
箭头函数中是没有 this、prototype、arguments 等!!只是单纯的在包裹函数中的词法作用域继承其 this 而已!!
所以并不是我们常用的 var self = this 之类的hack
参见: 阮一峰issue中的讨论 MDN