Now you have to create different scenarios. Good thing we know how to do that using if / else statements.
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.’”
Use an if / else statement to write out the last part of this game!
Make sure to check the console for error messages and suggestions for how to fix them.
(these are the instructions given)
and below is my 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!”);
console.log(“Oh no! Bieber shakes his head and sings ‘I set a pace, so I can race without pacing.’”);
it is really not working. i just gigured out that im still not in the “age” part so maybe it’ll really not work if i put it there. so i removed it instead and followed the instructions. how come it’s still not working? :(( im stuck. Thank you! :))