How do you include the function isNaN?


How do I include the function isNaN in this code.


function isEven(number) {
  return !(number % 2)



Add an if/else statement in your function. if(isNaN(number)) - return "It's not a number!", else: do what you usually do (you already have it in your code)


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