What is wrong with these return statements?


So, I have tried this code a few times, and these return statements seem to be messing it up. All I have been told is that they are illegal return statements... (See picture... Though this is not the whole code). Any thoughts?


Post your whole code.

Most likely you are using isEven in the if instead of the proper argument.

This can lead to recursion which isn't what you want at this time.


instead of

if (isEven % 2){
    return true;


if (isEven){
   return true;


Here is the entire code

var isEven = 86

return true
return false


Are you saying that if I just use 86 rather than isEven, would that work?


it still says that the return statements are illegal... why?


Hi inside your if statement you missing === 0 after your number 2 like that

if (isEven % 2 === 0)