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 2 Solution

Code wont work nothing prompts, still looks just like Dave's don't understand the problem, why does this keep happening?

https://w.trhou.se/eghiewt8xk

Was I supposed to put something else in the index.html? He talks about putting something in between line 10 and 12 but he never does in the video?

2 Answers

Yazeed Bzadough
Yazeed Bzadough
4,880 Points

Hi Melissa,

I haven't watched the video, but I did copy your code and run it in my browser, Google Chrome. Chrome's debugger (open it with hotkey ctrl + shift + j on Windows, or command + option + j on Mac) reported an error on line 20: Uncaught SyntaxError: Unexpected token =

I believe this was due to a syntax error in your for loop: for (var = i; i < arr.length; i += 1)

See the problem? :) var = i will cause the debugger to throw an error, so I just changed it to var i = 0; and it worked like a charm.

Hopefully that helps, and let me know if you have any other questions!