<i dont know what is wrong with this code. keeps telling syntax error.>


#1

var isEven = function(number) {

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

}
isEven(10);


#2

Hey.

You're calling the function incorrectly. You need to call the name of the function which in this case is isEven.

EDIT: Also I missed something, after your returns you have a period then true and false you need to remove the periods.

e.g.
.
return false;


#3

this was helpful..thanku :slight_smile:


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.