The Story Heats up!


Hi Everyone

My code is accepted however Im always testing it to see if the 'else' works as well...

my last 'else' is completely ignored by the consol and I dunno y.. :frowning:

Can somebody correct me please?

Here it is:

// Check if the user is ready to play!
confirm('Are you ready to play?');
var age = prompt('Whats your age?');
if (age < 13) {
console.log('You are allowed to play but I take no responsibility');
else {
console.log("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'");
var userAnswer = prompt("Wanna race?");
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.'");


= is assignment, that's not a condition


had the same exact problem in the same exact spot. After some digging around. It is in line 15. We both had if (userAnswer = "yes")

it should read if (userAnswer === "yes")

We both used a single = sign, when we needed to use ===. Hope that clears it up for you! it did for me.


you have to change '=' in if condition to if(userAnswer==="yes") thats all