Problem in code your adventure(5.The story heats up!)


#1

I cannot find my error please help me.here is my code
confirm("I am ready to play!");
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 === 1){
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

I think it's asking for an assignment in the "If" statement, rather than an equals, would suggest perhaps trying = rather than ===?


#3

//please read this instruction in "Code your Own Adventure 1. Confirm"
//One note before we begin. Each of the following exercises will ask you to add on to your previous //code. Make surenot to delete or change anything that you did in a previous exercise. Good luck!

//Every consecutive lesson should have code copied from previous lesson, so code in this lesson should look something like this. ie code in lesson 5 should contain code from lesson 1,2,3,4. i had the same issue but after reading again from lesson 1 helped. I hope this helps for you too.

// Check if the user is ready to play!
confirm("I hope you are ready!!");

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

if ( age <= 13 )
{
console.log("You are Minor");
}
else
{
console.log("Good Luck!!");
}

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?");
console.log(userAnswer);

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


#4

thanks bro that works