Simple code is: function bodyOnLoad() { const outerValue = 'ipsum'; function inner() { var innerVaue = 'test test'; debugger; } inner(); }
-
-
Awesome pro-tip.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
You might then ask why this doesn't happen automatically. Well, the function may be on the stack several times, e.g. in a recursion, so the same variable may have different values depending on which stack frame it belongs to.
-
Not sure I understand even in recursion, seems like if the VALID value is accessible by clicking the prior callstack frame, then if the lambda doesn't have the value in its stack, then it auto-walks back the stack (just like a click would) to get the valid from the outer frames.
- 10 more replies
New conversation -
-
-
Is there any visual way to show scope depth like a highlight color gradient for every function that goes deeper. Very pale blue towards a darker blue, with current line as green?
-
New conversation -
-
-
Using Linux on the desktop like a boss
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.