What is the issue w/ my code?


I'm getting the wrong return I believe? I'm not sure. Anything glaring?


"Looks like your function returns false when number = 2. Check whether your code inside the if/else statement correctly returns true if the number it receives is even."

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


There are two problems with your if condition:

if (isEven % 2)

isEven is the function name, i would use the parameter of the function (number) instead. Since you pass numbers into the function, and a function itself never has a remainder.

And you might also want to compare to zero, the reminder of a even number is 0, which is considered false, the remainder of a odd number is 1, which is considered true, so either compare with zero, or swap the return false and return true


Sir, thank god you replied to this!
I've been stuck on this part for a while, so woo, that works!