Created
March 6, 2017 13:06
-
-
Save sygn/25908099860df1d58d94e5a5cdd13378 to your computer and use it in GitHub Desktop.
array iteration with item variable
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 items = [1, 2, 3, 4, 5]; | |
for (var item, i = 0; item = items[i]; i++) { | |
console.log(item); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment