2. if/else if/else


#1


var isEven = function(number) {
  // Your code goes here!
  if(number % 2 === 0) {
    return true;
  }
  
  else if( isNaN(number) ) {
   return "blah";
  }
  
  else {
    return false;
  }
  
};

isEven(24a);

it is showing a syntax error. please help me. thanks


#2

Remove the a in isEven(24a);.


#3

use inverted comma "24a"


#4

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