?
Consider the following code snippet :
Consider the following code snippet :
var scope = "global scope";
function checkscope() {
var scope = "local scope";
function f()
{
return scope;
}
return f;
What is the function of the above code snippet?
var scope = "global scope";
function checkscope() {
var scope = "local scope";
function f()
{
return scope;
}
return f;
Answer & Solution
Correct Answer:
Option
C
The above code snippet returns the value in scope.
Join the Discussion
Login to post a comment or share your explanation.
Login