If/ Else TypeError: isEven is not a function


#1

var isEven = function(number) {
if( number % 2 === 0) {
return true;
}
else {
return false;
}
};
isEven = (4);

Well, still perfect! What he does not like??


#2

we don't need = sign for calling a function.simply do

isEven(4);


#3

I will no longer stupidly copy from the examples on the forum) Thank you!


#4

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