More Control Flow Lesson 2


I'm getting an error telling me that there's a reference error and its possible that I've erased "isEven". I'm not sure what the issue is here. Can someone help?

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

Replace this line with your code.


The spelling is slightly off... isNaN(). Since the function returns a boolean, we only need to test its truthiness.

else if (isNaN(number)) {
    return "Not a Number";


Thanks! got it to work.


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