1.

What is the fundamental rule of lexical scoping?(a) Functions are declared in the scope(b) Functions are executed using scope chain(c) Functions are declared outside the scope(d) Variables are declared within the functionI have been asked this question during a job interview.I'd like to ask this question from Closures in portion Lexical Structures of JavaScript

Answer» CORRECT ANSWER is (b) Functions are EXECUTED USING scope chain

The best I can explain: The FUNDAMENTAL rule of lexical scoping is that the JavaScript functions are executed using the scope chain that was in effect when they were defined.


Discussion

No Comment Found

Related InterviewSolutions