More Flow


#1

I didn't see where the error was in the basic set up so I tested the function with the number 10. Since it is divisible by 2, I think it should return true. This time the error msg. is unexpected syntax "(".

Any ideas on why this isn't working? Thanks.

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


#2

We need to call the function by its name.

isEven(10);

#3

@mccbjnn When you call your function, call it as

isEven();

rather than

function();

Make sense?


#4

Yes, just trying to get through too fast. I should have remembered that I had already defined the function.