Thanks for the post. Closures can be confusing. But this line that I saw somewhere else helped demystify them form me...Closures take a snapshot of the function's local scope and make it available to be used in an outside scope .
Thanks for the post. Closures can be confusing. But this line that I saw somewhere else helped demystify them form me...Closures take a snapshot of the function's local scope and make it available to be used in an outside scope .
I couldn't find that exact line, but to be clear inner functions take a snapshot of an outer functions variables that can then be used in the inner function even if the outer function has returned. Glad the post helped.
I meant on a different site.