Created
June 14, 2013 22:24
-
-
Save ultim8k/5785750 to your computer and use it in GitHub Desktop.
A faster javascript loop
This file contains hidden or 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
/** | |
* A faster javascript loop | |
*/ | |
var fruits = ['orange', 'apple', 'banana', 'pear', 'peach', 'cherry']; | |
var i = fruits.length; | |
while(i--) { | |
console.log(fruits[i]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment