I don't know what I am doing wrong! 5/7


#1

Hello, I have been stuck with this problem for a while now! Could somebody please tell me what I am doing wrong? It says i am not remembering to put in the "yes" option.

Here is the code:

confirm("Are you ready to play?");

console.log("I am!");

var age = prompt("What is your age?");

if(age < 13) {
console.log("You are still young, so I take no responsability.");
confirm("Do you want to go on?");
} else {
console.log("Get ready! This is gonna be a bumpy ride!");
}
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 shoe lace!")
}
else
{
console.log("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'")
}


#2

There are no semicolons on the end of console.log()


#3

I´ve tried but it still doesn't seem to be working!


#4

Remove the confirm("Do you want to go on?");
its not needed.

And try again. If not working please show your new Code.


#5

var age = prompt("What is your age?");

if(age < 13) {
console.log("You are still young, so I take no responsability.");
confirm("Do you want to go on?");
} else {
console.log("Get ready! This is gonna be a bumpy ride!");
}
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 shoe lace!");
}
else
{
console.log("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'");
}


#6

I type in the Code what i can see:

// Where is your first confirmation? 
var age = prompt("What is your age?");

if(age < 13) {
console.log("You are still young, so I take no responsability.");
confirm("Do you want to go on?"); // this confirmation is not needed 
} else {
console.log("Get ready! This is gonna be a bumpy ride!");
}
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 shoe lace!");
}
else
{ 
console.log("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'");
}