Where is the wrong code?



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

var isEven = function(number) {
  // Your code goes here!
  if (number%2 == 0)
      return "Is Even Number"
  else if (isNaN(number))
      return "Not a Number"
      return "Is Odd Number"



You are returning the strings "Is Even/Odd Number" rather than true or false.


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