Problem on lesson 2


#1


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


I do not understand what i've done wrong in this line of code and i keep on getting this error message

Oops, try again.
Make sure your if/else if/else statement returns a string when the function input isn't a number.


var isEven = function(number) {
  // Your code goes here!
  if (number % 2 === 0) {
      return true;
  } else if (isNaN(number) === true) {
      console.log("Enter a real number");
  } else {
      return false;
  }
};


#2

this line:

console.log("Enter a real number");

you use console.log() instead of return (which explains the error message if you read it again)


#3

omg now that you mention it, it seems soo obvious. Thanks!