Else if



Oops, try again. It looks like you have an error in your code! See the error message for more details: ReferenceError: isNan is not defined

 var isEven = function(number) {
  if(number%2 === 0){
  else if(isNan ){
      console.log("I understand");



A couple things wrong here.

You are supposed to use return statements inside of functions instead of console.log.

isNan should be structured like this (isNaN(number)) - Capitalisation is important.

You are also supposed to return Boolean values true and false rather than the strings true and false. But you are right when you return a string for the isNaN else if.


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