Skip to content

Instantly share code, notes, and snippets.

@ultim8k
Created June 14, 2013 22:24
Show Gist options
  • Save ultim8k/5785750 to your computer and use it in GitHub Desktop.
Save ultim8k/5785750 to your computer and use it in GitHub Desktop.
A faster javascript loop
/**
* 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