The strory heats up! big problem


#1

https://www.codecademy.com/courses/javascript-beginner-en-x9DnD/0/5?curriculum_id=506324b3a7dffd00020bf661

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

please help !! it doesn't working... why???


#2

Hi can you post all your code?


#3

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

its all of my code


#5

this part you should also have the if statement that check you age the one you did before


#6

thank you my problem is solved , :heart_eyes:


#7

thanks this wasn't problem


#8

@scrubby440
Sorry, I thought there was a problem because the color changed (your console.log was red on the printout) but anyway, I deleted my post.