medium
1/6
Step Explanation
Understand what is happening first
Execution Visualizer
Watch memory, stack, queues, and output
Execution Visualizer
live
globalVar is in the global (outermost) scope. Every function in the file has access to it through the scope chain.
Call Stack
1 frame
TOP ↑
▲main()
frame 0↓ BOTTOM
Global Context
Memory
1 variableStack Memory
globalVarvarnew
"global"Scope Chain
Global Scope
globalVar
globalConsole Output
awaiting output...
varfnobjarrclosure
Code Preview
Active line 1
Code
line 1Tap Expand to view full code
1/6
← → Space R