2/9: It says "Syntax Error: Unexpected token else". Please help!


#1
var isEven = function(number) {

// Your code goes here!
if((number % 2)=== 0) {
return true;
} else if (isNaN(number)) {
return "Srry, not a number!"
}
} else {
return false;
}


Question 2 control flow
#2

just power down ur system and reset the code. this should help


#3

Seems like you have an extra } here:

 else if (isNaN(number)) {
          return "Srry, not a number!"
      }
}

but a missing } at the very end of your code. To close the function.


#4

Thank you soo much! That did it! @haxor789