Advertisement

Higher Order Functions

  • Anto Aravinth
  • Srikanth Machiraju
Chapter

Abstract

In the previous chapter we saw how to create simple functions in ES8. We also set up our environment to play around with functional programs using a node ecosystem. In fact, we created our first functional program application programming interface (API) called forEach in the previous chapter. There is something special about the forEach function that we developed in Chapter  2. We passed a function itself as an argument to our forEach function. There is no trick involved there; it’s part of the JavaScript specification that a function can be passed as an argument. JavaScript as a language treats functions as data. This is a very powerful concept that allows us to pass functions in place of data. A function that takes another function as its argument is called a higher order function.

Copyright information

© Anto Aravinth, Srikanth Machiraju 2018

Authors and Affiliations

  • Anto Aravinth
    • 1
  • Srikanth Machiraju
    • 2
  1. 1.ChennaiIndia
  2. 2.HyderabadIndia

Personalised recommendations