You are viewing a single comment's thread from:

RE: JavaScript ~ Closure

in #javascript7 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 .

Sort:  

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.

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.030
BTC 64542.61
ETH 3460.20
USDT 1.00
SBD 2.51