If / if else / else #2


#1

//can someone look over my code and tell me whats wrong. Thanks

var isEven = function(number) {
// Your code goes here!

if (number % 2 === 0)
{
return true;
}
if else (isNaN(number))
{
return "NEEE!";
}
else
{
return false;
}
};

isEven(number);


#2

wicht number is this exercise


#3

@viaaaron, if else? that is new, so far i know it is else if

@wilder24, this is the exercise


#4

More on Control Flow in JS
lesson
The Story So Far: If, Else, and Loops


#5

ok let me check this exercise


#6

didn't i already solved the problem then? i thought i did


#7

hahaha classic! I got it thanks


#8

oops, it seems there is another problem, when you call the function:

isEven(number);

you should pass in an actual number:

isEven(3);

#9

yep yep! i caught that thanks