Oops, try again. Your function returns true for 3!


Replace this line with your code.


Can you please paste in your code so we can help you


var isEven = function(number) {
   var x = number%2;
  if (isNaN(number))  {
      return"Input is not a number";
  } else if (x===0) {
    return"Your Number is even";
   }else {
    return"Your Number is odd";


Please see the code pasted above. My code works as expected but I am not sure why I am getting "Oops, try again.
Your function returns true for 3!
" thanks for your help


your if and is missing its closing curly brackets (})


Sorry , didn't get what you are saying ...I don't see missing curly brackets in my code


never mind, i guess i missed it. Let me have another look. My apoligizes


okay, sorry about that. You should return true for even number, and you should return false for odd number, you are returning strings


No worries . One of my colleagues looked at my code - he said the last return"Your Number is odd"; was causing the issue. I changed it to return false; and it worked !