2/9 I can't figure out how to write the code


Can I please have help with this.
The computer isn't logging what I want it to.
Here is my code:
var isEven = function(number) {
// Your code goes here!
if(number %2===0){
return true
}else if
isNaN === true {
return "this is not a number"
return false

When I run this the computer says there is a problem with my syntax.
If someone could help me it would be great.


In your isNaN, isNaN stands for Not a Number. So, to make isNaN into true, you must not put a number. Put it like this:

else if(isNaN(number))

Hope it helped! :smiley:


1-st You need to check your number for isNaN like:
return "this is not a number";
else if(number%2===0)
return true;

    return false;