Award JavaScript before the closure, let's tell you a little story.
Story background: Liu Bei and Cao Caocao time period of cooking wine, the story may be a little different, Liu Bei for Cao, Guan Yu for the spy.
Cough cough
Caocao very want to know his new Liu Bei all day tinker what;
Cao asked Liu Bei, Hyun-tak you tinker all day;
Liu Bei thought, I am how can I tell you, Labor is not to find death, beat a careless eye on the past, Caocao did not ask anything out;
Liu Bei back home, with Guan Yu said, two younger brother, Hum, Cao that silly hanging, hum!
Guan Yu also returned home at night, and said to his wife, Hum, big Brother that silly hanging, hum! I'll go and tell the Prime Minister.
Cao also can not stop, go to ask Guan Yu, Guan Yu is going to whistle, on 1510 ¥%...@?%%;
Caocao very happy back home, make a phone call to Liu Bei, married, tomorrow we come to drink ah ...
............
The JavaScript closure is done, that's the principle.
A simple understanding of javascript closures