DEV Community

Discussion on: What is a "Closure" in JavaScript?

Collapse
 
mohsenalyafei profile image
Mohsen Alyafei

Thank you for the article.
I had always been using the concept, but never called it a "closure". I have it in my mind as a "function wrapper". It allows all my inner wrapped functions (and at times do have a lot of them) to use all the common variables I have already declared in the main outer function without having to pass them individually to each function and declare them again.