If/else


#1

if i type yes it says "You and Bieber start racing. It's neck and neck! You win by a shoelace!"
but if i type something else it says the same thing, i wont it to say "Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'")

// Check if the user is ready to play!
confirm ("Are you ready to play?");
var age = prompt("What is your age?");
if(age < 13)
{
    console.log("Sorry you are too young to play!");
}
else
{
    console.log("You are old enough to play the game");
}
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(userAswer = "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

your write userAswer in your if statement instead of userAnswer


#3

Hi inside your if condition you should put equal with === like that

if(userAnswer === "yes")