Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Loops, Arrays and Objects Tracking Data Using Objects Review Loops, Arrays, and Objects

Udi Elenberg
Udi Elenberg
3,729 Points

suddenly im not sure about this question i think its a blackout or something can you help a little ?

Quiz Question 1 - 9 - the last Quiz of JavaScript Loops, Arrays and Objects

Can you be more specific as to what your question/issue is?

Udi Elenberg
Udi Elenberg
3,729 Points

Oh sorry, I was sure it included the question I had problem with

this one

"Complete the code below to display every property and value of an object named location:

__________ ( property___________ location ) {

document.write('<p>' + property + ':' + location[property] + '</p>'); } "

2 Answers

The give away here should be location[property] This lets me know that you are iterating through all properties in the location array and to do that you'll need a for loop. So your answer will be

for( property in location ) {
  document.write('' + property + ':' + location[property] + ''); 
} 

I hope this helps.

Udi Elenberg
Udi Elenberg
3,729 Points

helped a lot
thank you : )