1 | initial version |
The ECMAScript execution context specification is made up of several components that explain its state. These components are:
Variable environment: It contains the scope chain and all the variables declared in the current scope.
Lexical environment: It is similar to the variable environment, but it also contains any variables declared in the outer scope.
This binding: It is the value of the "this" keyword, which is determined at runtime depending on how the function was called.
Lexical this binding: Similar to the "this" binding, but it refers to the value of "this" in the outer lexical scope.
Code evaluation state: It is used to keep track of the state of the code being executed, such as whether it is currently running or paused.
Function stack: It keeps track of the order in which functions are called and their execution contexts.
Closure: A closure is created when a function is declared inside another function, and it allows the inner function to access variables in the outer function's scope even after the outer function has returned.