Please help with number 8


#1



I have gone over this what feels like a hundred times. can anyone please shine some light on it?

// Define quarter here.
val quarter= function(number) {
return (number/4);
};

if (quarter(12) % 3 === 0 ) {
console.log("The statement is true");
};
else {
console.log("The statement is false");
};

It keeps saying there is something wrong with my syntax.



#2

@gallo216

This is about control flow not functions or variables...

So there's no need of semicolons after the curly brackets of the if/else statement.


#3

Thanks for that. however I get the same response even if I remove those semicolons


#4

@gallo216

Hey this is var keyword for defining a variable right?


#5

Yes. Im creating the variable "quarter" and making it a function


#6

@gallo216

But your using val keyword instead. It should be var keyword right?


#7

You are absolutely right. I should have realized that from the "unexpected identifier" message. thank you so much for your help