Last active
April 3, 2019 19:17
-
-
Save darmentrout/4164c9ff64971ddbd102fa4cf268ad3b to your computer and use it in GitHub Desktop.
This is a stupid joke based on a song from 1996.
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 cars = { | |
"acura": { | |
"color": "blue", | |
"year": 2009 | |
}, | |
"buick": { | |
"color": "gray", | |
"year": 2010 | |
}, | |
"chevy": { | |
"color": "white", | |
"year": 2013 | |
}, | |
"datsun": { | |
"color": "blue", | |
"year": 1972 | |
}, | |
"fiat": { | |
"color": "yellow", | |
"year": 2010 | |
}, | |
"hudson": { | |
"color": "blue", | |
"year": 1950 | |
} | |
} | |
var blue_cars = 0; | |
Object.keys(cars).forEach(function(car){ | |
if( cars[car].color == 'blue' ){ | |
blue_cars++; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment