The 'end of imput' of the question


#1

HELLO once more my friends but I've looked for the answer of "the story heats up!" AND it seems to be no much easy..

console.log("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'");
confirm("Are you ready?");// Check if the user is ready to play!
var age = prompt("What's your age");
if(age < 13 ) {
console.log("you're allowed to play but you are only one responsible");
} else {
console.log("CONGRATS! YOU'VE JUST GROWN UP!");
var userAnswer = prompt("Do you want to race Bieber on stage?");
console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'");
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.'");
}

SyntaxError: Unexpected end of input

Oops, try again. There was a problem with your syntax.


#2

ok , fellas, I'VE GOT THE ANSWERRRR: here is

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


#3

I'm fairly certain it's due to you missing a couple equals signs in your if statement. However, it seems in your original post that it was the way it is supposed to be:

if(userAnswer === "yes") {
               ^^

Did your lesson pass with the new code you posted in your second reply @codewhiz71790?