1.

What does the interpreter do when you reference variables in other scopes?(a) Traverses the queue(b) Traverses the stack(c) Finds the bugs(d) Traverse the arrayI have been asked this question in an interview for job.My query is from Cache Variables and Properties across Scope in division Caching, Debugging and Animation of JavaScript

Answer»

The CORRECT option is (B) Traverses the stack

To ELABORATE: The interpreter executes the javascript code. Normally when you reference VARIABLES in other scopes at the global level, in other namespaces, and so on—the interpreter needs to traverse the stack to get to the VARIABLE.



Discussion

No Comment Found

Related InterviewSolutions