What is the fundamental rule of lexical scoping?
Functions are declared in the scope
Functions are executed using scope chain
Functions are declared outside the scope
Variables are declared within the function
Correct Answer : B
What will be the function of the following JavaScript code?
var scope = "global scope"; function checkscope() { var scope = "local scope"; function f() { return scope; } return f; }
Which of the following is not an example of closures?
What is the purpose of the dynamic scoping?