RE: JavaScript ~ Closure

You are viewing a single comment's thread from:

JavaScript ~ Closure

in javascript •  7 years ago  (edited)

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 .

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

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.