Confused on the IF/ELSE IF/ ELSE?


Not sure whats wrong with my code… Keeps saying i have a syntax error yet been looking at it for the past 30 minutes haha probably just a dumb mistake! Thanks

var isEven = function(number) {
  if (number % 2 === 0); {
   else if (isNaN(number)) {
       return ("This is not a number silly!")
   } else {


You have a semicolon after your first if statement, it’s terminating the line early
everything else looks good though


Thanks so much! just a dumb mistake haha


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