Conversation
Added new javascript question .
ganqqwerty
left a comment
There was a problem hiding this comment.
Can you add a bit of explanation?
|
Explanation:- In the outer function, both this and self refer to myObject and therefore both can properly reference and access foo. In the inner function, though, this no longer refers to myObject. As a result, this.foo is undefined in the inner function, whereas the reference to the local variable self remains in scope and is accessible there. |
|
Thanks for the idea. I think the book deserves the whole chapter about managing |
|
Sure thing. Can I also add some more good questions to this Repo ? Lastly, Can you please merge this PR ? Thanks. |
|
No, this one is not yet good enough to be merged, I will need to change it a bit. |
Added new javascript question .