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 .
RE: JavaScript ~ Closure
You are viewing a single comment's thread from:
JavaScript ~ Closure
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.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
I meant on a different site.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit