Last active
March 14, 2016 21:45
-
-
Save JasonDeving/02bfad68367cb30ff585 to your computer and use it in GitHub Desktop.
javascript - iterations for in loop
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 box = {} | |
box['material'] = "cardboard" | |
box[0] = 'meow' | |
box['^&*'] = 'testing 123' | |
// since var is variable the interpreter hold different properties in bracket notation because key holds the value | |
for(var key in box) { | |
console.log(box[key]) | |
} | |
// side note box.properties are only strings no special characters |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment