2.If / else if /else am I missing a ")"?


#1


2.If / else if /else

The error message is:

missing ) after condition
but I don't think I am. Am I?

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


#2

Your else if condition should be (isNaN(number)).


#3

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