Functions

Functions are a core construct in many programming languages. In JavaScript, they are first-class citizens which means that you can treat them like other values:

  • Store functions in variables
  • Pass functions to other functions
  • Return functions from functions
  • and more!

We will go over many of these features in this chapter.