Where is the syntax error for this when I'm trying to use isNaN?



It gave me a syntax error, but I can't tell what I did wrong. Thank you in advance for any help.

var isEven = function(number) {
  // Your code goes here!
 if (number % 2 === 0) {
     return true;
     } else if (isNaN(number) {
         console.log("The input is not a valid number.");
         } else {
         return false;



else if (isNaN(number)

missed a ) bracket


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