Return and Call of Functions within if/then statements


It keeps saying "unexpected identifier"...I can't figure out this part...
Call the function inside the if statement's condition (and put in a parameter value!) such that "The statement is true" is printed to the console.

Thanks for any help!

val quarter = function (number) {
return number/4;

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


Hi Eric,

Your error is for sure a bit tricky to spot, but why don't you give your code once over one last time? Are you sure you declared a variable?



Hi!! Wow, I can't believe that it was a typo all along!!! Thank you so much! I can't tell you how long I sat trying to figure it out before posting :slight_smile: I've just been trying to learn coding for the first time today so I don't really know what I'm doing so I assumed it was the code that was wrong. Appreciate the help!!


Hi Eric,

No problem! I had to look through your program a few times to figure it out too. Eventually, I compared yours to mine character by character until I found the discrepancy, hahaha. I'm glad to hear you tried to figure it out before posting; sometimes typos can be the trickiest errors :smile:

Welcome to the world of coding! I'm pretty new to it myself, but I hope you're having a good time.