Help with 5/2


#1



the error is "Oops, try again. Your function returns true for 3!"


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


#2

isNaN() takes an argument, and checks if this argument is a number:

console.log(isNaN(3));

the argument is missing in your case


#3

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