Javascript 闭包是如何工作的?

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.

转载于:https://stackoverflow.com/questions/111102/how-do-javascript-closures-work