5. The story heats up, cant get it to work


#1

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

It keeps telling me "Did you add an if statement to your code?", I can't fix it :frowning:


#2

Just from experience, put a ; at the end of the first 2 console.logs before var userAnswer...


#3

Maybe you forgot to add your previous code?
This part:

if (age < 13){
    console.log("statement here");
    }

else{
    console.log(" another statement here");
    }

BUT before adding the block of codes above, declare first the variable age that will holds your prompt question. like this:

var age = prompt("Whats your age?");

Under var age = prompt("Whats your age?"); you can now add the block of codes above.