在函数退出时,调用对象就会从作用域链中去掉。
When the function exits, the call object is removed from the scope chain.
全局变量总是最慢的,因为它们总是位于作用域链的最后一环。
Global variables are always the slowest to access because they are always last in the scope chain.
局部变量比域外变量快,因为它位于作用域链的第一个对象中。
Local variables are faster to access than out-of-scope variables because they exist in the first variable object of the scope chain.
如果不涉及到内嵌函数,这个作用域链是唯一引用到调用对象的。
When no nested functions are involved, the scope chain is the only reference to the call object.
如果要简短的描述作用域链的重点,作用域链大多与内部函数有关。
If to describe briefly and showing the main point, a scope chain is mostly related with inner functions.
关闭,如果做得正确,允许你通过封装数据的作用域链不能由其他人修改使用。
Closures, when done correctly, allow you to encapsulate data through the use of the scope chain that cannot be modified by any other caller.
首先将函数对象[[scope]]内部属性中的对象,按顺序复制到作用域链中。
The objects in the function object's [[scope]] property are copied into the scope chain in the same order.
这就意味着在执行with的过程中,实际上的局部变量都被移到作用域链上的第二个位置,这会带来性能上的损失。
This means that local variables actually move to an identifier depth of two during execution of the with, imposing a performance penalty.
这些处理程序可以注册为全局、服务或操作作用域,并且最终的处理程序链将通过结合所有作用域的处理程序得出。
These handlers can be registered in global, service, or operation scope, and the final handler chain is calculated by combining the handlers from all the scopes.
这些处理程序可以注册为全局、服务或操作作用域,并且最终的处理程序链将通过结合所有作用域的处理程序得出。
These handlers can be registered in global, service, or operation scope, and the final handler chain is calculated by combining the handlers from all the scopes.
应用推荐