I am relatively new to Javascript. I understand the concept of anonymous functions – but closures seem less clear. The similarity between the two (in my mind atleast), is confusing.
Could someone explain the difference? (preferrably, with some code snippet, to illustrate the points clearer).
Have you seen this article? http://www.jibbering.com/faq/faq_notes/closures.html
This could also be good as a starting point: http://www.javascriptkit.com/javatutors/closures.shtml