If/Else 1


#1

My code is this:

var isEven = function(number) 
{
  // Your code goes here!
if (isEven % 2 === 0)
{
    return true;
}
else
{
    return false;
}

};

isEven(4);

From what I can see this should be correct, but it keeps going straight to false. Could someone point me in the correct direction?


#2

try changing isEven to number


#3

the isEven here:

if (isEven % 2 === 0)

just to be precise.


#4

That did it. Thanks.