If / else if / else


#1


why is this not working?? It says: your function Returns true for 3
var isEven = function(number) {
  // Your code goes here!
  if (number % 2 === 0) {
     return true;
  }
  else if (isNaN(number) === false) {
      return "Not a number";
  }
  else {
      return false;
  }
  
};


#2

Hi codeninja07280,

change

else if (isNaN(number) === false) {

to

else if (isNaN(number)) {

#3

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