Skip to content

Instantly share code, notes, and snippets.

@tgk
Created December 7, 2011 13:28
Show Gist options
  • Save tgk/1442796 to your computer and use it in GitHub Desktop.
Save tgk/1442796 to your computer and use it in GitHub Desktop.
fns = [];
_ref = ["A", "B", "C"];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
ch = _ref[_i];
fns.push(function() {
return console.log(ch);
});
}
for (_j = 0, _len2 = fns.length; _j < _len2; _j++) {
f = fns[_j];
f();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment