Control flow functions enable us to do this in Node.js. A control flow function is a lightweight, generic piece of code which runs in between several asynchronous function calls and which take care of the necessary housekeeping to:

  1. control the order of execution,
  2. collect data,
  3. limit concurrency and
  4. call the next step in the program.