1 if/else please help


#1

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

};
isEven(8)


#2

true and false are Boolean values, you should just return the boolean value:

return true

same or false, you are currently returning a string


#3

thx a lot now it works


#4

8 posts were split to a new topic: [solved]1 if else help