What is a Closure?
A closure in JavaScript is a function that retains access to its lexical scope, even when the function is executed outside that scope. This means that the function can remember the variables from the surrounding context where it was created.