Stuck on 2/9


#1


Okay, friends, I keep getting error messages and I can't figure out why. Specifically, it's telling me that my code returns "true" for 3 (even though it doesn't).
I tried changing my "returns" from strings to booleans, but then it told me it had to be strings?

Halp.


var isEven = function(number){
  if ( number % 2 === 0) {
      return "true!";
  }

  else if (isNaN){
      return "false"; 
  }

  else {
      return "false";
  }

 
};
isEven(4);


#2

you should use Boolean values to return for if, else if and else, and then it works fine


#3

Hi remove the " " around true and false(s)


#4

It's telling me that I have to make sure my if/else if/else statements return a string though


#5

nope, it should return Boolean's


#7

and the else if statement shouldreturn a string...

else if (isNaN){
      return "here put a string for when number isn't a number"; 
}

and isNane look like that isNaN() and you should put the variable (number) you want to check inside the ()


#8

why revoke your answer? You where right. isNaN() should indeed take number as argument, to check if number is a valid number.