5. Oops, try again. Did you remember to put in the 'yes' answer option?


#1


5 the story heats up

Oops, try again. Did you remember to put in the 'yes' answer option?

go onto the next lesson.

confirm("I understand confirm!");// Check if the user is ready to play!
var age = prompt("What's your age");
if(age < 13)
{
    console.log("Play but we take no responsibility!");
}
else
{
    console.log("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 land Slide");
}
else
{
    console.log ("Oh no! Bieber shakes his head and sings");
    }


#2

I dont see any error

If I'm not mistaken I think the lesson is asking you to select yes when the prompt box pops up


#3

thank you for the reply. I type yes in the prompt box and the next piece of code plays out but then i get this error message.


#4

@meganinja36385,
You will have to use the EXACT text's as are mentioned in the Instructions....


#5

thank you for the response. I though i did?


#6

You forgot this on the last console.log : Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'

This is ■■■■■■■■.. that was the problem with me


#7

i set the console.log just not word for word for what it was going to say in the box. I have gone back to amend it and i get the same error message.

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 land Slide");
}
else
{
console.log ("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'");
}


#8

'yes' has to be in double quotes "yes"


#9

I'm pretty sure that isn't what the instructions are asking for.


#10

Double or single are fine, just don't mix them.


#11

nether ' ' or " " work.

confirm("I understand confirm!");// Check if the user is ready to play!
var age = prompt("What's your age");
if(age < 13)
{
console.log("Play but we take no responsibility!");
}
else
{
console.log("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 an Bieber start racing. It's neck and neck!! You win by a land Slide");
}
else
{
console.log ("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'");
}


#12

Your quotation marks aren't your problem there. You haven't used the right string in your console.log().

Did you check to see if that is what the exercise is asking you to use?


#13

Hi. Really enjoying this site, but I have to say I think it's really silly to force users to write the EXACT string in the console.log function in order to continue with the lesson...

At least, if that is going to be the case, change the feedback to accurately reflect that! I have a vast programming background in several languages, yet I was 'stumped' for 10-15 minutes trying to figure out what could possibly be wrong with my code simply because I wrote:

console.log("You and Bieber start racing. It's neck and neck... You WIN by a SHOELACE!");

If the feedback had told me to change my console.log output instead of questioning whether or not I had added the 'yes' option to my code, I would not be so frustrated.

Thank you!