What is an Activation object in JavaScript ?

时间:2015-05-13 12:01:30   收藏:0   阅读:182

********************* from Professional JavaScript for Web Development

Execution Context And Scope

  The execution context of a variable or function defines what other data it has access to, as well as how it should behave. Each execution context has an associated variable object upon which all of its defined variables and functions exist. 

  Each function call has its own execution context. Whenever code execution flows into a function, the function‘s context is pushed onto a context stack. After the function has finished executing, the stack is poped, returning control to the previously executing context.

  When code is executed in a context, a scope chain of variable objects is created. The purpose of the scope chain is to provide ordered access to all variables and functions that an execute context has access to. 

 

********************* from StackExchange

 Execution context is an object which consists of :

Variable object is an abstract thing, which can be either one of those :

Activation object is an object which holds :

So, activation object is just a special case of variable object;

It is basically a container for all the local stuff you can access by name inside a function, except for this

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!