5. The Story Heats Up (error in code)


#1
  1. The story heats up

    i keep getting SyntaxError: expected expression, got keyword 'else'
    and i just don't understand what's wrong with my code

confirm("I am ready to play")//asks player if ready to play
var age = prompt("What's your age");
if (age < 13)
{
    console.log("user is allowed to play but programmers are not to be held accountable for your actions.");
}
else
{
  console.log("Great! Let's keep playing");
}
console.log("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'");
console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'");
var userAnswer = prompt("Do you want to race Bieber 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.'");
}

#2

You shouldn't have a ; semi colon


#3

I get the following error : "Did you remember to put in the 'yes' answer option?"

Also find my code below:
confirm("Are you ready to start the game");
var age = prompt("What is your age");
if(age < 13)
{
console.log("You can play at your own risk");
}
else{
console.log("You are welcomed for this game");
}
console.log("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'");
console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'");
var userAnswer = prompt("Do you want to race Bieber on stage?");
if(userAnswer === "yes"){
console.log("You and Bieber start racing. It's neck and neck! You win by a shoelave!");
}
else{
console.log("oh no! Bieber shakes his head and sings 'I set a pace,so I can race without pacing.'");
}


#4

did you find the answer?