1.

What kind of scoping does JavaScript use?(a) Literal(b) Lexical(c) Segmental(d) SequentialI had been asked this question in quiz.I'd like to ask this question from Closures in section Lexical Structures of JavaScript

Answer»

The correct CHOICE is (B) LEXICAL

For explanation I would say: Like most modern PROGRAMMING languages, JavaScript uses lexical scoping. This means that functions are executed using the variable scope that was in EFFECT when they were defined, not the variable scope that is in effect when they are invoked.



Discussion

No Comment Found

Related InterviewSolutions