MCQ
Single Best Answer
Not Set
QWhat is a closure in JavaScript?
ID: #4876
Javascript Functions MCQ
210 views
Question Info
#4876Q ID
Not SetDifficulty
Javascript Functions MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option B
Explanation
A closure is a function that has access to the outer function's variables even after the outer function has returned.
Closures are created when a function is defined inside another function and the inner function has access to the outer function's variables.
Closures are often used to create private variables and to preserve state in callback functions.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic