Oops, try again. Did you add an if statement to your code?


#1

Oops, try again. Did you add an if statement to your code?


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


#2

Hi @8pcarter8p,

Make sure that you've added previous lesson's code.
that checks if user is ready to play and also their age.
As consecutive story depends on past lessons so you need to add them.
do reply what you get after doing that!


#3

Actually I'm on the one where you are supposed to do this.


#4

@greentreemee tks for you response, your solution worked for me


#5

Thanks! It totally worked for me! On to functions!


#6

Sorry I misunderstood what you said in my comment above! :wink:


#7

No prob! cheers :thumbsup:


#8

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.