Execution context stack

When execution context object produced? When a function call is generated
 
1. Before global code execution, js engine creates a stack to manage all stored execution context object
        2. After performing the global context (window) is determined, which is added to the stack (push)
        3. In the context of the implementation of the function created after adding it to the stack (push)
        4. In this function is completed, remove the top of the stack of objects (the stack)
        5. When all the code executed, only the window stack
 
When no function definition function context object, context object was to create a function that only 1 second before the execution, that is, do not call the function, then the function execution context is no object
 
 Variable lift and enhance the function declarations context and the execution result of this execution context stack technology --- "(data collection) Pretreatment
Var will be collected using the definition of variables
1. Create execution context
2. pretreatment (data collection) // parameter assigned to the assignment arguments to

Guess you like

Origin www.cnblogs.com/lucy-xyy/p/11708384.html