Getting a ReferenceError


#1

Hello, I am getting a ReferenceError for this lesson. It says exactly this message "It looks like you have a ReferenceError. Maybe you forgot to define a function named isEven?"

and my code is here:

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


#2

Hey @madshopkeeper! 2 problems:

First

:
To define a function you do it like this:

var isEven = function(){

}

But codecademy isnt updated to the new javascript as the new syntax is:

function isEven(){

}

Second

:
See here?:

Its suppose to be a comparator operator so we need two, == you did 1(=) whitch is an assignment operator


#3


They're actually both possible and even the mixture that @madshopkeeper uses so this is fine.