Getting IN-timate HELP


#1

https://www.codecademy.com/en/courses/objects-ii/1/4?curriculum_id=506324b3a7dffd00020bf661#

At the for in loop, I know it isn't supposed to say var 'nyc' but I don't know what i would put there to access all the properties in nyc. What should it look like?


var nyc = {
    fullName: "New York City",
    mayor: "Bill de Blasio",
    population: 8000000,
    boroughs: 5
};

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


#2

Your creating a new variable called nyc when you already have a variable called nyc.


#3

I just realized that and fixed it and it ran. I was trying to figure out how to delete the thread, but you responded first! thank you so much for the help! :):):slight_smile:


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.