Skip to content

Instantly share code, notes, and snippets.

@guillermoroblesjr
Last active August 29, 2015 14:15
Show Gist options
  • Save guillermoroblesjr/d519e64a0d3d3456ebed to your computer and use it in GitHub Desktop.
Save guillermoroblesjr/d519e64a0d3d3456ebed to your computer and use it in GitHub Desktop.
Fast 'for' JS Looping
var arr = [1,2,3,4,5];
for (var i = 0, len = arr.length; i < len; i++) {
(function(i){
console.log(arr[i]);
})(i);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment