New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Odd issue with arrow functions and this scope #733
Comments
|
Ah ok...learned something new today :) Thanks @developit and @stebru |
@sebmck, this is the third or fourth example of this sort of question being raised. Do you think we should put it on the website or docs somewhere? |
Yes please. First sentence is already misleading:
|
That is exactly how I was mislead. I did not realize that the |
Open an issue in https://github.com/6to5/6to5.github.io please |
@eventualbuddha Not sure if there's anything else that can be done since in all the examples where arrow functions are shown they're always presented with an automatic lexical scope binding. |
When using the npm library thinky, I have the following snippet of code:
Where
this
will be undefined. However, if I change the arrow function to an ES5 function:this
is defined as expected. What would causethis
to be undefined with an arrow function?The text was updated successfully, but these errors were encountered: