2 ms·
I haven't done JS in a while, but it sounds to me like it is referenced, just not in source code. `someMethod` references it implicitly. Is my understanding c
by favorited 9y ago
I haven't done JS in a while, but it sounds to me like it is referenced, just not in source code. `someMethod` references it implicitly.
Is my understanding correct?
- gsnedders 9y agoYes. The function's frame contains a reference to the object storing local variables of the parent frame. To do better you need to store a list of variables referenced (which you can only do if there's neither direct-eval nor a with statement).