Lesson 2: More on Control Flow


#1



Lesson 2 on control flow


I have no idea what I'm doing wrong. I checked the hint and all the messages on the forum, but still no luck :frowning:


var isEven = function(number)
var isNaN = function(number){
    if (number % 2===0){
    return true;
;}
    else if
        (isNaN(number)){
        return "This is not a number";
        }
    else{
    return false;
}
};


#2

HI first remove that line

var isNaN = function(number)

then inside your if statement you have more ; that you need so it should be like that

if (number % 2===0){
    return true;
}

and all your if, else if and else statement should be inside the function isEven

var isEven = function (number) { #open the function isEven

# here put the if,else if and else statement

}#close the function isEven