Expected an identifier and instead saw 'else' error


#1

I am stuck on code your own adventure, the error seems to be on line 18 with my second else statement, can anyone see what I have done incorrectly? Thanks in advance :slight_smile:


// Check if the user is ready to play!
confirm("I am ready to play!");
var age = prompt("what's your age?");

if ( age < 13) {
console.log("you shouldn't play, but it's your choice");
} else {
    (age > 13);
console.log("go for 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 wn 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

I worked it out, all sorted, admin - please delete this post!


#3

Hello @rhians,

should be

} else {

You need to take the semicolon away. :wink:

@minasf


#4