Chapter 6. Understanding asynchronous flow control methods in JavaScript

This chapter covers

  • Understanding callback hell and how to avoid it
  • Making Promises and keeping them in JavaScript
  • Using asynchronous control flow
  • Learning event-based programming
  • Using Harmony (ECMAScript 6) generator functions

Chapter 5 taught the importance of building your components in a modular fashion, and you learned a great deal about scoping, hoisting, and closures, all of which are necessary to understand asynchronous JavaScript code effectively. Without a modest understanding of asynchronous development in JavaScript, it becomes harder to write quality code that’s easy to read, refactor, and maintain.

One of the most frequently recurring issues for ...

Get JavaScript Application Design: A Build First Approach now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.