A

Admin • 828.03K Points
Coach

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?

  • (A) Returns value null
  • (B) Returns exception
  • (C) Returns the value in scope
  • (D) None of the mentioned
  • Correct Answer - Option(C)
  • Views: 6
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin
The above code snippet returns the value in scope.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.