Excercise 6 of "Code Your Own Adventure!"


#1

IGNORE THIS POST. I HAD A DOUBT BUT I FIGURED IT OUT. I CANT FIGURE OUT HOW TO DELETE THIS POST SO JUST DISREGARD IT.
Okay, so I started with this section and everything was going rather well but this particular excercise is giving me trouble and I don't understand how my syntax is incorrect. Here is my code.
confirm("Are you ready to play?");
var age=prompt("What's your age");
if (age <13)
{
console.log("You're allowed to play, but I take no responsability")
}
else
{
console.log("Have fun playing!")
}

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 (userAnswer="no")
{
console.log("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'");
}
After pressing the "Save and submit" button, I'm told that I have and error in syntax. Honestly, I don't know where it is that I'm wrong.


#2

I think you need a semi-colon after each console.log statement. It looks like you're missing them at the end of the first console.log statements.


#3

I think you need to remove "(userAnswer="no")" and just leave else.