Possible problem in syntax I think, please help



So for the code below, everything works great except for the last bit starting from var userAnswer. The prompt works too, but if I say no, then it still prints out the if statement that you start racing and win.

What is the issue? I have tried changing “yes” to just yes, and then typed no in the prompt box and then I got an error message saying yes is not defined

confirm("I am ready to play");
var age=prompt("What's your age?");
if (age<13){
    console.log("User is allowed to play, but I take no responsibility");
        console.log("user is allowed 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="yes"){
    console.log("You and Bieber start racing. It's neck and neck! You win by a shoelace!");
    console.log("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'");


Hi this part you should use === instead of =



Don’t use = sign this is for assigning value. Use === sign for compairing value


Thanks, now it works.