9. getting INtimate


#1



Hi this is my code. It seems perfectly alright to me and correctly prints but gets an error.

It is 9, getting Intimate.


It says I didn't print out nyc's full name though i did.


var nyc = {
    fullName: 'New York City',
    mayor: 'Bill de Blasio',
    population: 8000000,
    boroughs: 5
};
for(var x in nyc){
    console.log(nyc[x]);
}


#2

https://www.codecademy.com/en/courses/objects-ii/1/4

We can refer to x directly...

for(var x in nyc){
    console.log(x);
}

#3

okay it works! Thank you!


#5

#6

#7

A post was split to a new topic: Prints out the propertys but not its values


#8