You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Second step of Environments in detail part starts with this statement:
The code runs on, and the call to makeCounter() is performed.
But before the function gets called, the counter variable is declared and put inside the global Lexical Environment with an undefined value. (If I've learned correctly 😄)
I don't know if its a mistake or you didn't mention this on purpose for the sake of simplicity. But I think the counter variable should be present in the global Lexical Environment of the provided snapshots.