I’m super not embarrassed to admit that I just learned:
ES6 arrow functions do not have their own `this`. They inherit `this` for free without having to do `.bind` or `self = this`. 
-
-
var a = () => {}; a.prototype; // undefined var b = function() {} b.prototype; // blah blah
-
Right. I was listing keywords or special-cased identifiers you’d use within an arrow function.
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.
Those, and `this`, are not special-cased or anything — it’s just that arrow functions don’t create a new function scope.