2. Getting ReferenceError isNAN not defined, what am i missing?


#1

Here is what I have

var isEven = function(number) {
if (number % 2 === 0) {
return true;
}
else if (isNAN(number)) {
return "entry was not a number"
}
else {
return false;
}
};


#2

first it should be isNaN not isNAN
and second you forgot to all the function.like

isEven(arg);

The code in a function is not executed when the function is defined. It is executed when the function is invoked.Some people use the term "call a function" instead of "invoke a function".


#3

Worked perfect! Overthinking a bit on my end thank you