Have you failed a job interview?
Send us your job interview questions and get correct answers.
Explain lexical scope in JavaScript
Experience Level: Medior
Tags: JavaScript
Answer
Lexical Scoping defines how variable names are resolved in nested functions: inner functions contain the scope of parent functions even if the parent function has returned.
Related JavaScript job interview questions
Explain the concept of closures in JavaScript
JavaScript MediorWhat is hoisting and what do you know about it?
JavaScript MediorWhat does prototypal inheritance mean?
JavaScript Medior