Plurrrr

Wed 17 Nov 2021

JavaScript Bites: Closure

Closure is the concept of storing a function and its environment together. When you create a function, it stores the functions local environment and its outer environment together. If you are ever confused about what value will be present, understand what value existed when the function scope was created!

Source: JavaScript Bites: Closure.