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

Why my program is working fine but, I cant pass(red to next question

Here is my program: var answer= prompt("What is the best programming language?"); if (answer.toUpperCase() === "RUBY") alert(" you are right") else (" you are wrong");

5 Answers

I cannot stay years after year for a question which stays red with a running program.

Olga DC
Olga DC
16,680 Points

Hi Benoit Missing semicolon after alert(" you are right")

It doesn't work, I kill myself to explain that the programs work fine, it is the quiz who stays red, I thank very much indeed, the last program I tried here-below.

var answer= prompt(" what is the best programming language?"); if (answer.toUpperCase()==="RUBY") alert("you are correct"); else {alert("you are not right")}

Many thanks

I tried but again the program IS Working, but thte page squiz/ video mention 'javasript is remaining red I tried one day five hours. so the program is ok. but the squizz does'nt increment thankyou so Much olga

Could anyone check my squizz to see if it work? Because I am Stuck in my evolution, I will never finish the squizz.-Nor the training. var answer= prompt(" what is the best programming language?"); if (answer.toUpperCase()==="RUBY") alert("you are correct"); else {alert("you are not right")}

Could anyone check my squizz to see if it work? Because I am Stuck in my evolution, I will never finish the squizz.-Nor the training. var answer= prompt(" what is the best programming language?"); if (answer.toUpperCase()==="RUBY") alert("you are correct"); else {alert("you are not right")}

Olga DC
Olga DC
16,680 Points

Now you forgot the semicolon after alert("you are not right").