It always says yes


#1



It never give me 'else'. it always goes with "You and Bieber start racing. It's neck and neck! You win by a shoelace!" No matter what i type in prompt box. And it's not codecademy.. in my browser same story ... even when I click "No" in prompt box....


var userAnswer = prompt("Do you want to race Bieber on stage?");
if(userAnswer === 'yes' || '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

You may need to make them separate cases like this:

if(userAnswer ==='Yes'){

console.log("You and Bieber start racing. It's neck and neck! You win by a shoelace!");
}
else 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.'" )

That works and later on in the course you learn how to do this with less code.