Help with Bieber!


#1

This is my Code:

confirm("I am ready to play!");
var age=prompt("what's your age?");
if (age<13)
{
console.log("You are allowed to play. However, i take no responsibility");
}
console.log("Go ahead. Play on!");
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.'");
}
The error I get is ("Oops, try again. Did you add an else statement to your code?")

Can i get some help, please and thanks!


#2

The code seems okay to me, try to refresh the browser or reset and paste in the code again.


#3

Hi @yytaq,

You were supposed to do it like this:

Look at the bolded parts. You see the else loop? You didn't put that, unlike the directions.:smiley:
That's the problem.:smiley: