Oops!try again your function returns true for 3


#1

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

isEven();
};
`

please help me!!


#2

We don't write quotes around boolean primitives.

    return true

Is written inside the function body. It should be written after the closing brace, and it needs an argument.

isEven(3);

#3

@mtf
yeah..but here i've taken as string


#4

Hmm.. i have tried but it is not working!!


#5

Hi can post your code new code?

here how to format your code


#7