5. The story heats up!


#1

I got an error in " 5.Tje story heats up!"

the error is"Did you add an if statement to your code?",
please help me :disappointed_relieved:

**//my code**

//Check if the user is ready to play!
var userAnswer=prompt("do u want start?");
var result=userAnswer;
if(result==='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

Hi you shouldn't remove the if statement that check for the age


#3

I suggest you reset the lesson and then start again, so that you get your previous lessons code back


#4

oh~~
I see~
Thanks!! :smile:


#5

Thanks ~~~~~
:smile:


#6

How the heck could I complete this course? I have just copied pasted them, but still not working. Refreshing the browser many times and still not working.

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.'");
}


#7

Hi what error do You get? If It is

Did you add an if statement to your code?

You should do what @zainabrawat Said.
if It isn't You should post your code and the error you get .


#8

got it,Thanks for everyone's enthusiasm! :smile:


#9