The execution context is removed from the stack after executing a return statement, or all code has been parsed. There can only ever be one execution context running at a time, but that execution context may be paused at any time to enter a new execution context. ECMAScript refers to this as the running execution context.
An execution context contains at least three properties: a variable object, a scope chain, and thisBinding.
The variable object contains the variables and functions declared inside of the current execution context, and if this execution context was created by a function it also contains the function arguments. This is when hoisting happens, you can read my article about that.
Contains the current variable object as well as the variable object of the outer context (execution context on the stack one below the current execution context) variable object. If the current execution context is the global execution context there is no outer context.
Gives the current execution context access to
Top comments (1)