1

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: Returns the value in scope

Make the most of this question

This page focuses on one JavaScript MCQs question from Programming. After checking the answer, return to the topic list to practice more or run a timed set.

JavaScript MCQs MCQ: 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? | Extra Education