Else/if with isNaN



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) {
  if(number % 2 === 0){
  else if(isNaN = false){
      return("What you put in isn't a number");


And what is isNaN

How you should work with isNaN can you read here:
Method isNaN()


remove the brackets in return, and remember to put what you want to check in the isNaN(something)


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