Trouble


#1



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



why is this saying: Oops, try again. Make sure your if/else if/else statement returns a string when the function input isn't a number.


#2

your function logs not a number to the console, it doesn't return it (use the return keyword)


#3

Remove the quotation mark in number on your else if statement, it should look like this:
> else if(isNaN(number)) or else if(isNaN())

If you have quotation mark on that number, you are making a "number" as a string not a parameter.

Let me know if that helps


#4

ok, i worked on it,

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

says returns true for 3


#5

if else runs, the number is odd, false should be returned