5 help


it keeps telling me that I have a syntax error even though I have checked it many times.

confirm(“I am ready to play!”);
var age = prompt(“whats your age”);
if(age < 13);
console.log(“You are not old enough to play”);
console.log(“You are old enough to play”);

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” || userAnswer === “Yes”)
console.log(“You and Bieber start racing. It’s neck and neck! You win by a shoelace!”);
console.log(“Oh no! Bieber shakes his head and sings ‘I set a pace, so I can race without pacing.’”);


Hey @duseph,

There cannot be any semi colons after the loop/function and before the first corresponding bracket.

The semi colon cancels out the whole loop, and also makes it useless. So I suggest that you take the semi colon out. :smiley:


Don’t kick yourself too hard after this… but here’s your error…

if(age < 13); <
{           ^


wow I didn’t even see that haha thanks man!