作用域链(The Scope Chain) 在ES5中引入了Function.prototype.bind方法,用于控制函数的执行上下文,它会返回一个新的函数, 并且这个新函数会被永久的绑定...
基于1个网页-相关网页
The objects in the function object's [[scope]] property are copied into the scope chain in the same order.
首先将函数对象[[scope]]内部属性中的对象,按顺序复制到作用域链中。
When the function exits, the call object is removed from the scope chain.
在函数退出时,调用对象就会从作用域链中去掉。
When no nested functions are involved, the scope chain is the only reference to the call object.
如果不涉及到内嵌函数,这个作用域链是唯一引用到调用对象的。
应用推荐