Getting a ReferenceError


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;
return false;


Hey @madshopkeeper! 2 problems:


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(){



See here?:

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


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