I'm Stuck and i have no idea what's wrong


#1


I'm stuck and no idea what's wrong with the code :frowning:

"Code your own adventure!" step 5.


Gives me this "Oops, try again. Did you remember to put in the 'yes' answer option?"
If I remove the "===" and put "=" instead it says that "yes is not defined".


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

var age = prompt("What's you age");

if (age < 13) {
    
    console.log("You are allowed to play but at your own discretion");
} 
else {
    console.log("Have fun");
}
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("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'");
}

else {
    console.log("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'");
}


#2

I'm actually really stupid ROFL, sorry for the spam,,


#3

well what was it ?=)


#4

I have the 2nd quote 2 times in the code.


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.