If / else if / else


#1

What is wrong?

var isEven = function(number) {
if(number%2===0){
return "true";
} else if(isNaN(number)){
return "It is not a number";
}
else {
return "false";}
};

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


#2

var isEven = function(number) {
if(number % 2===0){
return true;
}
else if(isNaN(number)){
return "It is not a number";
}
else {
return false;}
// Your code goes here!
};
it works now!!!!!! :smiley: