More on Control Flow in JS (2)


Hello, I would like some help solving this problem. I can't see what I am doing wrong!

Oops, try again. Your function returns true for 3!

var isEven = function(number) {
  // Your code goes here!
     if( number % 2 === 0 ){
      return "it's true";
      else if( number === isNaN ){
          return "the input is not a number";

          return "it's not true";



you should return Boolean values (true and false) for even and odd numbers, not strings

You use isNaN wrong


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