Mistake?


#1

Can anyone finds the mistake?? It's really frustrating :slightly_smiling:

confirm("I am ready to play! Let's play")
var age = prompt("What's your age")
if (age<13) {
console.log("The game company will take no responsibility for player under 13")
}
else {
console.log("Perfekt! Ready for Ramboooo!")
}
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?'")
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 forgot ending semicolons.


#3

where do you put the ending semi colons ._.


#4

Here is the new code. This should work. You also missed a few ) at the end of some console.logs
I also suggest learning to code neatly, helps a lot.

confirm("I am ready to play! Let's play")

var age = prompt("What's your age")
if (age<13)
{
console.log("The game company will take no responsibility for player under 13");
}
else
{
console.log("Perfekt! Ready for Ramboooo!");
}

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?'");
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.'");
}