Bug on if/else 'ifeven' function



error message: "Looks like your function returns false when number = 3. Check whether your code inside the if/else statement correctly returns true if the number it receives is odd."

^the exercise is testing for even numbers. So if the function returns false while the number is 3, the code is correct. the error message seems to indicate a bug in this course.

Replace this line with your code. 
var isEven = function(number) {
  // Your code goes here!
  if ((number%2)===0) {
      return "true";
  else {
      return "false";


you return strings, the exercise asked you to return boolean values


It is because you are returning strings, remove the quotes and your gtg. Also you may shorten

to just (number%2), because if this is equal to 0, that also means true


actually, no? zero is considered false and one is considered true? So if you don't check equals zero, you have to swap return true and false


^^^^ What he said, I got switched. Cheers!


i on purpose didn't mention it, because it only adds a degree of difficulty


awesome- deleted the quotations from the return statement. thank you!