The Story Heats Up? Can't get it work


#1

Here is my code, but i keep getting this error: Oops, try again. Did you remember to put in the 'no' answer option?

// Check if the user is ready to play!
confirm ("I am ready to play!");
var age = prompt("What's your age");
if(age<13)
{
console.log("You are allowed to play, but we assume no responsiblity.")
}
else {
console.log("Prepare to have fun!")
}
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("It's neck and neck! You win by a shoelace!");
}
else
{
console.log("you lose sucka!");
}


#2

You are missing a lot of ; in your code. But it would still pass. But, add ; after you console.log() where it's missing. The reason it fails is because you have wrong message in your else code.

If userAnswer is "yes", print out: "You and Bieber start racing. It's neck and neck! You win by a shoelace!"
Otherwise, print out: "Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'"

So you just have to call console.log("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'"); instead of console.log("you lose sucka!"); and it will be fine.


#3

Thanks! for some reason i thought i could put whatever i wanted in the console.log.


#4

To be honest, that was my first guess too. But when I ran your code and compared it to mine, I've seen that you must have that exact line.