What is the significance of closures in JavaScript?
The question is about JavaScript
Answer:
In JavaScript, a closure is a function that remembers its surroundings even when it has closed. A closure will always have access to its containing scope variables – even after the outer function has returned. It maintains state in asynchronous callbacks, private variables. A closure encapsulates the state hence making the application secure in JavaScript.