Vidyalelo
JavaScript · Q32

Array And Function

Programming · JavaScript · question 32

Q32

Which of the following are examples of closures?

A.
Objects
B.
Variables
C.
Functions
D.
All of the mentioned
Answer

Answer: Option D

Solution

Answer: Option D
Solution:
Technically, all JavaScript functions are closures: they are objects, and they have a scope chain associated with them.