Don't understand the error


#1

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


var a = 3;
var isEven = function(number) {

  if(a%2 === 0)
  {
      return true;
  }
  else
  {
      return false;
  }
};
isEven(a);


#2

Be sure to use the number parameter inside the function, not a.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.