What is wrong with my code please?



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.

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


Javascript has the so-called Remainder-operator %
is actually a modulo-operator
and if used it will return the rest-value.

9%3 You read it as nine modulo three is zero, as 9 divided by 3 has NO rest-value.
22%6 You read 22 modulo six is 4, as 22 divided by 6 will leave you with rest-value 4
10%5 You read 10 nodulo five is zero, as 10 divided by 5 will have NO rest-value

Thus if you use
number%2 === 0
then you know that the number is an Even number.....
and you then use
return true

You can express a Boolean Value with true or false



If you put the number value as 20, and then you made it go to return "False", then it will return false, rather then true, unless I'm misunderstanding what you need to do in the exercise


Then what do I need to do in order to make it "True" ?


How do I get my code to return "True" rather than "False"


Read my Post once more....
when to use the
return true