Created
January 25, 2017 10:50
-
-
Save cboursnell/a486d21c8eea12ce077a16747c1bb472 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 sets = new Array(); | |
function run() { | |
put_things_in_array(); | |
print_things_from_array(); | |
} | |
function put_things_in_array() { | |
for(var i = 0 ; i < 10; i++) { | |
var obj = new Array(); | |
obj['name'] = "Cat"; | |
obj['size'] = "Medium"; | |
sets[i] = obj; | |
} | |
} | |
function print_things_from_array() { | |
for( var x in sets) { | |
console.log(x +" : "+sets[x]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment