4 ms·
I agree. The key to grokking this is the difference between a function's execution context and its lexical scope. If you don't explain that I don't think you've
by fenomas 9y ago
I agree. The key to grokking this is the difference between a function's execution context and its lexical scope. If you don't explain that I don't think you've explained anything, and if you do then there's no need to think about separate cases like the article suggests.
- Joeri 9y agoIf you think of javascript code like an english sentence, then the function is the verb, the context (this) is the subject and the scope (arguments, closed over variables) are the nouns.
- rippeltippel 9y agos/nouns/objects/g (then the analogy works for me)