Reference error for isNan()


#1

//This is my code

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

#2

Never mind I figured it out


#3

What was the error?
I am having the same issue

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

isEven(2);

#4

Ok I found the error^^

Spoiler

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

isEven("");


#5

For those still searching the Problem was that it is written

isNaN with an uppercase N at the end instead of IsNan. Because the latter one is unknown so far you get the Reference Error.