If/else returns false every time


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


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.


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


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


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