Something
public javascript v1 · immutablevar funcs = [], i = 0;while (i<10) { (function (j) { funcs.push(function(){ console.log(j); }); })(i); i++;}var funcs = [], i = 0;while (i<10) { (function (j) { funcs.push(function(){ console.log(j); }); })(i); i++;}