Syntax error in "Code Your Own Adventure" part 5


#1

I keep getting an error saying "SyntaxError: Unexpected token ILLEGAL", and I don't really know what I did wrong. Can anyone help? Here's what I have on it:

// Check if the user is ready to play!
confirm("Are you ready to play?")
var age = prompt("What's your age?");
if (age < 13)
{
console.log("I don't claim any responsibility or whatever")
}
else
{
console.log("Okay, now have fun playing this game... if that's what you can call it")
}

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 need a semicolon at the end of each console.log() statement.


#3

you also need () around userAnsewer ="Yes


#4

and you need to use == in your if statement , = is not a comparison operator

if you just use = you set userAnswer to "Yes"

and don't forget semicolon after each line

exemple:
if (userAnswer == "Yes")