Please help me out with this code


#1

I dont understand whats wrong with the code, can someone please help me out?

var isEven = function(number)
{
if(number%2===0)
{
return("True");
}
else{
return("False");
}
};

isEven(4);


#2

you don't need parentheses for return in javascript, and i would return Boolean values (true and false), so without quotation marks (") since that makes them strings

if problems persist, post an updated version of your code and the exercise url


#3

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