One of the most important concepts of JavaScript is execution context. Let’s define global, function and eval execution contexts and see some examples.
A closure is the combination of a function bundled together with references to its surrounding state. It’s a simple and useful technique once you understand it.