Q. What is a closure in JavaScript?

  • (A) A function with preserved data
  • (B) A function with no parameters
  • (C) A loop
  • (D) An event handler
πŸ’¬ Discuss
βœ… Correct Answer: (A) A function with preserved data
Explanation: A closure is a function that remembers variables from its outer scope.
Explanation by: Mr. Dubey
A closure is a function that remembers variables from its outer scope.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
65
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
83%
Success Rate