[solved]1 if else help


#1

it doesn't work for me. I've copied everything and "return"ed "true" instead of false. I would really appreciate it if you could help me.


1 if/else please help
#2

Hi try to Post your code


#3

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

};
isEven(8)

};


#4

You should remove the " " around true and then in the else statement return false

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

};
isEven(8)

#5

Thx sooo much finally worked. I tried taking of the "" but it still didn't work. So I copied ur code and it went thru. :slightly_smiling:
:blush:


#6

it was the false
:joy:


#7

it is ok now right? lad


#8

yes it is. T.hx for the concern