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

Christopher Shaw
Christopher Shaw
10,035 Points

JavaScript not running

My javascript is no longer displaying when I run the programs. I'm following the videos line by line, my javascript and pop ups are enabled, I've used different browsers and different computers, but still my programs won't run. Maybe I'm blind but I'm pretty sure all the code is correct to at least prompt the question. Thanks!

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,253 Points

Could you post your code for us so we can check it out? It might be a simple issue of a file path not correctly linking to your JS file. :-)

6 Answers

Take a look at your for statement. A traditional one is like

for (var i = 0; i < questions.length; i += 3) {
    question = questions[i][0]; 
    answer = questions[i][1]; 
    response = prompt(question); 
    response = response.toLowerCase(); 
}

You forgot to add the BOOL operation < or >

Christopher Shaw
Christopher Shaw
10,035 Points

I'm trying to figure out how to post the images haha having a little difficulty

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,253 Points

Here's the markown code for images :)

![alt text](/path/to/img.jpg "Title")

Try something like that, with a relative file path to your image whereever on the internet it is :) I fixed up your JS code in the meantime.

Christopher Shaw
Christopher Shaw
10,035 Points

http://imgur.com/a/fwfWU

heres a link, I cant figure out how to post the image.

I've corrected the questions.length in the second condition also and it still wont run

in you for loop, take away the () from the 2nd condition. question.length;

Christopher Shaw
Christopher Shaw
10,035 Points

I did that, sorry its not updated in the picture, and its still not running

can you share you workspace

Top right, select share workspace icon and create share. Once it's made, open the shared workspace and copy and paste the link.

It would help us view the livecode

Christopher Shaw
Christopher Shaw
10,035 Points

Well it seems to be working now! Thanks Fernando Boza and sorry for the sloppy post, its my first one so I wasnt sure how to share images and all.

No worries, keep going with the good work