If / Else if/ Else - need help


#1

I cannot figure out what's wrong with my code - I keep getting an error that reads "Oops, try again. There was a problem with your syntax."

My code is:

var isEven = function(number) {
if(number % 2 === 0){
return true;
} else if (isNaN(number); {
return "Not a number";
} else {
return false;
}
};

Any suggestions? Trying to run it with isEven(44); for example just returns same error message.


#2

Updated:

I know I was missing a parenthesis here: "} else if (isNaN(number); {" and it should be "} else if (isNaN(number)); {" but it is still not working. Need help! Thanks!


#3

Yes it looks like the issue is on this line like you said

} else if (isNaN(number)); {

try removing the ; it doesn't belong there


#4

Just figured that out! Thank you for the help! Can't believe I missed that.