1. Why is this incorrect


#1


https://www.codecademy.com/courses/javascript-beginner-en-qDwp0/0/1?curriculum_id=506324b3a7dffd00020bf661


I'm looking in the FAQ but I can't find a solution.


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


#2

Identify what it's doing differently from what you want and then use console.log to study how it reaches the incorrect behaviour.


#3

try this code it will work

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

};
isEven(6);


#4

Thanks for the help! I used console.log to find the issue.


#5

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