If/else if/else problem, help please?


#1

I don't know what is problem with my code. Always resoult is: Oops, try again. Your function returns true for 3!
My code is:

var isEven = function(number) {
if (number % 2 === 0 ) {
return true;
}
else if (isNaN(number)) {
return "Your input isn't a number!";
}
else {
return false;
}

};
isEven(42);


#2

Ok, thank you. Problem solved . Was a bug, I just needed to refresh the browser. Great :smile: