If/else returns false every time


#1

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

isEven(48);

This is my code. Don't understand where the problem is. I get this message every time:

Oops, try again. 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.


#2

Your code is correct! I think it's a glitch.


#3

you should check if the function parameter (number) is divisible by 2, the function itself is not divisible by 2


#4

Thank you, I was trying to figure it out for quite long time.


#5