🔰execution context
state to track the execution progress of code.
JS ⟩ concept ⟩ execution context
An execution context contains whatever implementation specific state is necessary to track the execution progress of its associated code.
It may contain (but not limited to) the following:
lexical environment - stores variables/this ...
code evaluation state - state needed to perform/suspend/resume evaluation of the code associated with this execution context.
📘 JS spec ⟩ 8.2 Execution Contexts
At any point in time, there is at most one execution context that is actually executing code. This is known as the running execution context.
A stack is used to track execution contexts. The running execution context is always the top element of this stack.
Last updated