Skip to content

Instantly share code, notes, and snippets.

@JasonDeving
Last active March 14, 2016 21:45
Show Gist options
  • Save JasonDeving/02bfad68367cb30ff585 to your computer and use it in GitHub Desktop.
Save JasonDeving/02bfad68367cb30ff585 to your computer and use it in GitHub Desktop.
javascript - iterations for in loop
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