re: Understanding Javascript Closures VIEW POST


Nice post and how I look at Closures:

When the main function is executed and some variables are assigned a return function,
even later by calling the returned function, we can access the variables that was in the call when the return function returned.

After the execution of the main function, the Scope chain is kept and referred to and is considered to be the parent of the function that is returned and which will be later called.

code of conduct - report abuse