Q. 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?
β
Correct Answer: (C)
Returns the value in scope
Explanation: The above code snippet returns the value in scope.