SyntaxError: Unexpected token else


I have this issue with else if statements. Every time i get " SyntaxError: Unexpected token else". Can someone please explain why this is? thank you in advance.

var userAnswer=prompt("Do you want to race on stage?");
console.log("You win!");
console.log("Oh no! You lose");


Hi you should remove the ; after the if condition

if(userAnswer==="yes"); <== this one

For more information you could read this


Thanks it help :smile: