for (var i = 0; i < some_array.length; i++) { // This declares and immediately calls a function, and x // is scoped to that function call. (function (x) { closures.push(function () { // Do something using x. I'll just return it. return x; }); )(some_array[i]); // And here is where we bind the value. } // We now have one closure per array element.