Variable Creation¶
When defining a closure, the lexical variables (in the use clause) are created immediately, with the default value of null. The closure is executed later, and then, the values of the lexical variables are changed.
When creating an anonymous object, the constructor is immediately executed: hence, the argument with reference is created, then initialized with [] and immediately available.
See Also¶
Create variables with a closure [Try me]