var array = ['aaa', 'bbb', 'ccc', 'ddd', 'eee']; | |
for (var index in array) { | |
console.log(index + ': ' + array[index]); | |
} | |
console.log(index); | |
// 0: aaa | |
// 1: bbb | |
// 2: ccc | |
// 3: ddd | |
// 4: eee | |
// 4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment