More on Control Flow in JS lesson 1. If/Else


#1



https://www.codecademy.com/courses/javascript-beginner-en-qDwp0/0/1?curriculum_id=506324b3a7dffd00020bf661#


I've written the code so that the function returns "true" if the number is even. But I get an error message telling me "Oops, try again. 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."
What am I doing wrong here?


var isEven = function(number) {
  if (number % 2 === 0) {
      return "true";
  }
  
  else {
      return "false";
  }
  
};


#2

your function returns strings, it should return Boolean's values:

return true

with the " true and false are just strings