What is a closure in JavaScript?
Sigiloso
A closure is when an inner function has access to the variables and parameters of its outer function, even after the outer function has returned. To use a closure, define a function inside another function and expose it. To expose a function, return it or pass it to another function.