Getting a closure on JavaScript.