How do you explain closures?
andreyf: You have about 10 seconds to get his interest before he starts thinking about his WoW raid tonight, and about 5 minutes for the whole explanation.Not going to happen. First, you need a person that wants to better themselves as a programmer, and understanding closures is just a part of that. Discounting the time it takes to put someone in that state of mind, closures can be explained in under a minute (edit: OK, maybe two minutes ;)).A closure is just a (function, bindings) pair. If someone has a Java/C++ background, it might help to think of a closure as an object which has some code with references to variables defined outside of that code. Those variables are dependencies without which you can't run the code.JavaScript example:    function foo() {
        var x = 1;
        function bar() {
            return x + 1;
        }
        return bar;
    }

What does foo() return? It returns bar. But it can't just return bar, since bar has a dependency on x, so it returns bar and everything bar references: the closure (bar, { x: 1 }). In practice, you call a closure as you would call a function, but underneath the abstraction, you need to realize what's returned is both bar and the value of x.