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 trialUdi Elenberg
3,729 Pointssuddenly 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
Udi Elenberg
3,729 PointsOh 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
Chyno Deluxe
16,936 PointsThe 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
3,729 Pointshelped a lot
thank you : )
Chyno Deluxe
16,936 PointsChyno Deluxe
16,936 PointsCan you be more specific as to what your question/issue is?