Let's get started with a short review of functions in JS and their relationship to FP concepts. We can start something we mentioned in previous chapters, about functions as first-class objects, and then go on to several considerations about their usage in JS.
In lambda calculus terms, a function can look like λx.2*x. The understanding is that the variable after the λ character is the parameter for the function, and the expression after the dot is where you would replace whatever value is passed as an argument.
Note
If you sometimes wonder about the difference between arguments and parameters, a mnemonic with some alliteration may help: Parameters are Potential, Arguments are Actual. Parameters are placeholders for potential values that will be passed, and arguments are the actual values passed to the function.
Applying a function means that you provide an actual argument to it, and that is written in the usual way, by using parentheses. For example...