Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

How do JavaScript closures work?

Return to the General Comments forum
Login to post to this thread

How do JavaScript closures work? - Feb 1 at 7:15AM
Alice Mike
1 Posts

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?

I have seen the Scheme example given on Wikipedia, but unfortunately it did not help.

http://www.javascriptkit.com/cutpastejava.shtml

Post edited February 1, 2017 at 7:15 AM EST.


The OSP Network:
Open Source Physics - Tracker - EJS Modeling
Physlet Physics
Physlet Quantum Physics