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 Multiple Items with Arrays Build a Quiz Challenge, Part 1 Solution

Brian Foley
Brian Foley
8,440 Points

Prompt won't work :(

Can anyone see why my questions won't pop up? I just can't see it. Any help is very much appreciated! https://w.trhou.se/5q1lcgunrk

2 Answers

As Tanja pointed out, you have a typo, but you also have another error in your for loop: remove the semi-colon after the third conditional statement, or you will see an "Unexpected token ;" error in your console.

for (var i = 0; i < questions.length; i += 1)

or the more commonly used:

for (var i = 0; i < questions.length; i++)
Brian Foley
Brian Foley
8,440 Points

Oh, yes! Thanks for pointing that out!

Tanja Schmidt
Tanja Schmidt
11,798 Points

You're missing a "g" in "questions.length" in Line 17 - that should do the trick. If not, please write back. :)

Brian Foley
Brian Foley
8,440 Points

Ugh I can't believe I did that. Thanks for pointing that out!