I need you help guys!


#1

var isEven = function(number) {
// Your code goes here!
if((number%2) === 0)
{
return true;
}
else if(isNaN("number"))
{
return "The variable number isn't a number";
}
else
{
return "The variable number is a number";
}
};

This is my code, but when I click down Sava & Submit Code this message appear "Oops, try again. Your function return true for 3!"

I will appreciate your help!!
Blessings!!!


#2

else if(isNaN("number"))
              ^      ^

You're seeing if the string "number" is not a number. Which is always true! Get rid of those Parenthesis


#3

var isEven = function(number) {
// Your code goes here!
if(isNaN(number) == true){
if(number % 2 == 0){
return "Thank you for your input"
}
else{
return "Please insert a number"
}
}
};

Whats wrong with this code?