Examveda
Examveda

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?

A. Returns value null

B. Returns exception

C. Returns the value in scope

D. None of the mentioned

Answer: Option C

Solution(By Examveda Team)

The above code snippet returns the value in scope.

This Question Belongs to Javascript >> Array And Function

Join The Discussion

Related Questions on Array and Function