If else Not sure whats frong


#1

Cant get why is not working

isEven(8);
var isEven = function(number) {
  if (number % 2 === 0 )
            {
            return "true";
            }
        else 
            {
            return "False";
            }
  
};

#2

isEven is not defined by the time you call it. You should first define your function, then call it.


#3

I corrected that but still wont work

var isEven = function(number) {
  if (number % 2 === 0 )
            {
            return "true"
            }
        else 
            {
            return "False"
            }
  
};
isEven(8);`

Oops, try again. Looks like your function returns false when number = 3. Check whether your code inside the if/else statement correctly returns true if the number it receives is odd.
`

#4

you should return boolean values, not strings


#5

Worked with boolean,thx stetim94


#6