Whats wrongs?


#1

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
if/else

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
Oops, try again. Looks like your function returns false when number = 2. Check whether your code inside the if/else statement correctly returns true if the number it receives is even.

```

var isEven = function(number) {
// Your code goes here!
if(isEven%2===0){
return true;
}
else {
return false;
}
};
isEven(6);

<do not remove the three backticks above>

#2

here:

if(isEven%2===0)

isEven is a function, functions aren’t divisible by 2, what variable should you use here?


#3

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