If else error


#1

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

Oops, try again. Looks like your function returns false when number = 3. Check whether your code inside the if/else statement correctly returns true if the number it receives is odd.

can you please help me


#2

return boolean values, not strings


#4

Thanks a lot it worked


#5

what will it return if i write
return "true";
and
return true;


#6

it will return a string, which has the text: true

will return a boolean value

MDN - string
MDN - Boolean