Just out of curiosity, do closures in JavaScript get a reference to the whole "outer environment", or is the returned function analyzed to see which variables in the outer scope it references and then only gets references to those?

Edit
Report