`this` inside modules
Kevin Smith
zenparsing at gmail.com
Mon Jun 9 16:14:34 PDT 2014
> What is an arrow function bound to in a module?
>
> ```js
> export var a = () => this;
> ```
>
As with all arrow functions, `this` is lexically bound, so it will bind to
whatever `this` is bound to within the module. Which is kinda the question
at hand.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140609/e36753d6/attachment.html>
More information about the es-discuss
mailing list