If / else


What is wrong with this code:

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


if a number is even, the remainder is zero, so else will run. So else should return true, and if should return false, or you should compare the remainder with zero

Also, true and false should be boolean values, not strings

If/else why should else return true and if false

Thanks! :joy: :joy: :joy: