I want to know where am I getting wrong?


#1

confirm("I am ready")

var age=prompt("What's your age");
if (age<13)
{
console.log("Allowed to play take no responsibility");
}
else
{console.log("go ahead");
}

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


#2

Look at this closely. First of all, you put the wrong type of equal sign (find out which one). Also, you put the word yes like a variable. Yes is supposed to be a string, for it's an answer from the prompt. So, you also have to change Yes to a string.