If / else


Hello all, I feel like this should be super easy! and cant figure out whats wrong with my code, help would be great thanks!

var isEven = function(number) {
if (isEven === 4) {
else { return(false);


if (isEven === 4)

why are you checking whether or not isEven equal to 4?

what is isEven?
why did you take number as parameter?


can anyone please tell what’s wrong in this code.

var isEven = function(number) {
return “string”}
else if(!isNaN(number))
return"some string"}
return “yet another string”


the error i’m getting is
Oops, try again. Your function returns true for 3!

thanks in advance


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