Last active
February 1, 2018 14:33
-
-
Save kevinchisholm/c9678a142b471d71715bba13c007fffb to your computer and use it in GitHub Desktop.
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
var days = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday']; | |
for (var day in days) { | |
console.log(day); | |
} | |
/* | |
OUTPUT: | |
0 | |
1 | |
2 | |
3 | |
4 | |
5 | |
*/ |
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
var days = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday']; | |
for (var day in days) { | |
console.log(days[day]); | |
} | |
/* | |
OUTPUT: | |
monday | |
tuesday | |
wednesday | |
thursday | |
friday | |
*/ |
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
var days = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday']; | |
for (var day of days) { | |
console.log(day); | |
} | |
/* | |
OUTPUT: | |
monday | |
tuesday | |
wednesday | |
thursday | |
friday | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment