Problem in Code Your Own Adventure


#1

The story heats up part.
I am new to scripting therefore have no idea what the problem is with this. It says syntax error.

   console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'");
}
var userAnswer = prompt("Do you want to race Beiber on stage?");
if (userAnswer === "yes"); 
{
    console.log("You and Bieber start racing. It's neck and neck! You win by a shoelace!");
} 
else
{
    console.log("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'")
}

Please help, thank you!


#2

Whenever it says you have a SyntaxError, please double check your code before posting. It is obviously that } on the second line causing you trouble. And note that you have an extraneous ; in the if statement.

Fix both of these and you are good to go!


#3

Aaahh!!! Thankyou so much!! :smile: