1.

What must be done in order to implement Lexical Scoping?(a) Get the object(b) Dereference the current scope chain(c) Reference the current scope chain(d) Return the valueThe question was posed to me during an interview.Enquiry is from Closures topic in section Lexical Structures of JavaScript

Answer»

The correct choice is (C) REFERENCE the current scope chain

Best explanation: In order to IMPLEMENT LEXICAL scoping, the internal state of a JavaScript function object MUST include not only the code of the function but also a reference to the current scope chain.



Discussion

No Comment Found

Related InterviewSolutions