Anton Kovalyov: > We were talking with colleagues about closures and this question came up. > When JavaScript interpreters parse a function, do they always keep its > reference to the outer scope or do they keep it _only_ when needed (i.e. > when something inside the function accesses variables from a closure)?
Even that you have got your answer, your question depends on how a particular function has been created. For example if you use `Function` constructor it never form a closure with VO of calling execution context. In this case the [[Scope]] property of the created function always refers the Global Object. -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
