1.

During the traversing through the stack, where does it go after it goes to the namespace?(a) Window(b) Function(c) Document(d) LocationThis question was posed to me during an internship interview.I'm obligated to ask this question of Cache Variables and Properties across Scope in section Caching, Debugging and Animation of JavaScript

Answer»

Correct answer is (a) Window

For explanation I WOULD say: Namespace in JavaScript is nothing but a SINGLE global OBJECT which will contain all our functions, methods, variables and all that. During the TRAVERSAL in the stack manner, after going to the namespace, it GOES to the Window.



Discussion

No Comment Found

Related InterviewSolutions