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 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.