```
var isEven = function(number) {
// Your code goes here!
if (isEven % 2) {
return true;
}
else {
return false;
}
};
This is my code. I don't get what the problem with this code is please help!
```

# 1. If / Else

**y10soyoon**#1

**stetim94**#2

isEven is the function, how does a function have a remainder?

if the remainder **equals zero**, i don't see the equals zero in your code

**ayusshverma**#3

well it should get true if the remainder = 0 so your code should be

if isEven % 2 == 0:

return True

else:

return False

**stetim94**#4

isEven is the function, the remainder of a function divided by 2 is an error.

modulo can only be used for numbers

**bitace65049**#5

var isEven = function(number) {

// Your code goes here!

if (number%2===0){

return "true";

} else if (isNaN(number))

{ return "false";}}

isEven(3);

**system**#7

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