Created
October 17, 2014 15:57
-
-
Save daihuaye/da0eb75e86cb70c25bd6 to your computer and use it in GitHub Desktop.
Loops can get terribly slow in JavaScript.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var names = ['George', | |
'Ringo', | |
'Paul', | |
'John']; | |
for(var i=0,j=names.length;i<j;i++){ | |
doSomethingWith(names[i]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment