There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
You can also find further discussion and get answers to your questions over in Language Help.
Agree with a comment or answer? Like () to up-vote the contribution!
In the second one you are calling reminder but you are not logging what it returns to the console so you are doing nothing with the result of calling it (the “Remember to buy vegetable now !!!” string).
You’re basically just creating a function that doesn’t return the result immediately after calling it.
For example if we had the following :
reminder = remindMeTo(‘be cool’)
That means that in the variable reminder we now store a string (Remember to be cool !!!) since the return of remindMeTo(‘be cool’) gives us that string. And if we wanna see it we can console.log(reminder).
But if we have,
reminder = remindMeLater(‘be cool’)
The variable reminder now stores a function. Because remindMeLater(‘be cool’) returns a function, and only after we call it, that function returns the string. So if we wanna see the string, we have to call it inside the console.log(reminder());