Created
March 14, 2016 23:50
-
-
Save JasonDeving/558e9643c43324a37062 to your computer and use it in GitHub Desktop.
objects
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 animal = {}; | |
animal.username = 'Mittens'; | |
animal['tagline'] = 'pet me'; | |
var noises = []; | |
animal.noises = noises; | |
var count = 0; | |
for(var key in animal) { | |
count++; | |
if (key === 'username') { | |
console.log('hi my name is ' + animal[key]); | |
} else if (key === 'tagline') { | |
console.log('I like to say ' + animal[key]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment