In Chapter 2, Thinking Functionally – A First Example, we went over an example of Functional Programming (FP) thinking, but let's now look at the basics and review functions. In Chapter 1, Becoming Functional – Several Questions, we mentioned that two important JavaScript features were functions: first-class objects and closures.
In this chapter, we'll cover several important topics:
- Functions in JavaScript, including how to define them, with a particular focus on arrow functions
- Currying and functions as first-class objects
- Several ways of using functions in an FP way
After all this content, you'll be up to date as to the generic and specific concepts relating to functions, which are, after all, at the core of FP!