If/else statement syntax error?


#1

When I save and submit this code, I keep getting an "error, unexpected token else"
Does anyone know what I did wrong?
Thanks

if (userAnswer.length === 3); {
    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

The semicolon is not necessary. Also, please post a link to the exercise this is from and all of your code for it. :slight_smile:


#3

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