When a closure "captures" a variable it "lifts" the variable out of its local scope and effectively moves it into an anonymous object.
当一个闭包“捕获”一个变量时,它就会将这个变量提取出它的本地范围,移到一个匿名对象里。
A transient variable enables the application to keep a copy in local memory, but rebuilds the object if using the backup copy.
临时变量允许应用程序在本地内存中保留副本,但可以在使用备份副本的情况下重新构建对象。
To fetch elements from the collection, you had to know the type of object in the collection so you could cast it back to the appropriate local variable.
要从集合中提取元素,您必须知道集合中对象的类型,以将其强制转换为合适的局部变量。
However, the method copies a pointer to the selected function into a local variable, and then calls the function with the call method of the function object, rather than calling it directly.
但是,这个方法将所选函数的指针复制到一个局部变量中,然后用function对象的call方法调用这个函数。而不是直接调用它。
To create a thread-local variable, you instantiate an object of class ThreadLocal.
要创建一个线程局部变量,请实例化类ThreadLocal的一个对象。
This means that you can easily access members directly off a returned object, or you can assign it to a strongly typed local variable without having to cast.
这意味着你可以直接在返回的对象上访问成员,或者可以使用强类型的局部变量为其赋值,而无需进行转换。
Generally speaking, if you're going to read an object property more than one time in a function, it's best to store that property value in a local variable.
一般来说,如果在同一个函数中你要多次读取同一个对象属性,最好将它存入一个局部变量。
Local variables are faster to access than out-of-scope variables because they exist in the first variable object of the scope chain.
局部变量比域外变量快,因为它位于作用域链的第一个对象中。
In standard c, the effect of this is to forbid the use of the address of a thread local variable as an initializer for an object or pointer.
在标准c中,这种作法的效果是禁止将线程本地变量的地址用作对象或指针的初始值设定项。
It is not necessary that the function definition is textually enclosed in the class definition: assigning a function object to a local variable in the class is also ok.
不是必须要将函数定义代码写进类定义中,也可以将一个函数对象赋给类中的一个变量。
Note that assigning the desired object to exports will simply rebind the local exports variable, which is probably not what you want to do. module.
为了实现这个,需要将期望导出的对象赋值给module . exports。注意,将期望的对象赋值给exports会简单地重新绑定到本地exports变量上,这可能不是你想要的。
In this case, the root object is not also added as a member or local variable.
在这种情况下,不会将根物件做为成员或区域变数加入。
In this case, the root object is not also added as a member or local variable.
在这种情况下,不会将根物件做为成员或区域变数加入。
应用推荐