A

Admin • 802.91K Points
Coach

Q. What is the function of this code snippet?

Code:
var scope = "global scope";
function checkscope() {
var scope = "local scope";
function f()
{
return scope;
}
return f;
  • (A) Returns value null
  • (B) Returns exception
  • (C) Returns the value in scope
  • (D) None of the mentioned
  • Correct Answer - Option(C)
  • Views: 3
  • Filed under category JavaScript
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.