1/14 - Looks like your function returns false when number = 3


keep getting the same error. I think it has something to do with my if number equation, but I'm not sure how to make it work. The hint didn't help

var isEven = function(number) {
if(number/2) {return true;}

else {return false}


They want you to use the so-called remainder-operator

To check if you have an even-number
you should use
number%2 and do the comparison with =zero=
number%2 === 0

PS. do not forget the the closing-curly-bracket-}, with which you close the function-body


google search
== the Book ==
javascript [your question] site:developer.mozilla.org

== discussions / opinions ==
javascript [your question] site:stackoverflow.com

== guidance ==


Terima Kasih banyak atas ilmunya


try adding "};" in the end of your code to see if it works that way. I had the same problem and I just looked to your exercise to realize what was wrong with mine and also figured out what may be wrong with yours.


I am having the same issue and cannot figure out where my code is wrong.
var isEven = function(number) {
if ((isEven % 2) === 0) { return true; }
else { return false; }

I always get "Looks like your function returns false when number = 2.
Can someone help please? Thanks


isEven is then name of your function so [Function]%2 is kind of weird better use your parameter number here.


Thank you. I need to go back and learn why using the function (which, in my mind should "resolve" to (number)) is different than using (number).
I really appreciate your answer!! Thanks!

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

I think you should add ((number % 2) === 0) instead of (number/2)


thank you i was stuck on that one