9. getting INtimate

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

Hi this is my code. It seems perfectly alright to me and correctly prints but gets an error.
<Below this line, add a link to the EXACT exercise that you are stuck at.>
It is 9, getting Intimate.

<In what way does your code behave incorrectly? Include ALL error messages.>
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);
}

<do not remove the three backticks above>

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

We can refer to x directly…

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

okay it works! Thank you!

1 Like

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