What is closure in JavaScript?
In JavaScript, a closure is created when a function is defined inside another function. The inner function has access to the outer function's variables and parameters, even after the outer function has returned.
This happens because the inner function "closes over" the variables and parameters of