Vidyalelo
JavaScript · Q31

Array And Function

Programming · JavaScript · question 31

Q31

What is a closure?

A.
Function objects
B.
Scope where function’s variables are resolved
C.
Both Function objects and Scope where function’s variables are resolved
Answer
D.
None of the mentioned

Answer: Option C

Solution

Answer: Option C
Solution:
A combination of a function object and a scope (a set of variable bindings) in which the function’s variables are resolved is called a closure.