4 First move!


#1

console.log("Suddenly,Bieber stops and sais, 'Who wants to race me?'");
var userAnswer = prompt("Do you want to race Bieber on stage?");
if (userAnswer == "yes")
{
    console.log ("Let's do this!");
}
else (userAnswer == "no")
{
    console.log ("Don't be scared!");
}

I keep getting this error message. Any help is appreciated!
Oops, try again. Did you remember to console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'"); ?


#2

Hi, @improviser14 ,

Make sure the spacing and spelling in your output matches exactly what is specified in the instructions.

Also check the syntax for using else if and else in JavaScript. You have ...

else (userAnswer == "no")

#3

Thanks a lot applpye! I was stuck on that one for far too long.


#4

This topic was automatically closed after 7 days. New replies are no longer allowed.