Created
February 26, 2015 11:45
-
-
Save shigemk2/c55a9c826654673a80e0 to your computer and use it in GitHub Desktop.
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 array = [ { 0 : 'aaa' }, { 1 : 'bbb'}, { 2 : 'ccc' }]; | |
for (var index in array) { | |
console.log(index + ': ' + array[index][index]); | |
} | |
console.log(index); | |
// 0: aaa | |
// 1: bbb | |
// 2: ccc | |
// 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment