Fazer cerrveja. Kick Ass. Repetir.
…on gets created and passed around or returned from another function, it carries a backpack with it. And in the backpack are all the variables that were in scope when the function was declared.
The way I will always remember closures is through the backpack analogy. When a function gets created and passed around or returned from another function, it carries a back…
…to remember is that when a function gets declared, it contains a function definition and a closure. The closure is a collection of all the variables in scope at the time of creation of the function.