1. Chapter 1. Asynchronous JavaScript
    1. 1.1. Async XHR (3 second load time)
    2. 1.2. Example callback
    3. 1.3. Passing a callback as a predefined function
    4. 1.4. A callback being invoked asynchronously
    5. 1.5. Using synchronous code to write and read a file in Node.js
    6. 1.6. Using asynchronous code to write and read a file in Node.js
    7. 1.7. Naive asynchronous code
    8. 1.8. The jQuery.ready function can be synchronous or asynchronous
    9. 1.9. HTTP request in Node.js
    10. 1.10. Using setTimeout to demonstrate the event loop
    11. 1.11. Async XHR (3 second load time repeated from earlier)
    12. 1.12. Race condition
  2. Chapter 2. Introducing Promises
    1. 2.1. Using callbacks
    2. 2.2. Promise then and catch
    3. 2.3. Chaining calls using then and catch
    4. 2.4. Creating and resolving a promise
    5. 2.5. One promise with multiple consumers
    6. 2.6. The state of a promise never changes after it is fulfilled or rejected
    7. 2.7. Convenience functions for resolve and reject
    8. 2.8. Calls to then always return a new promise
    9. 2.9. Using then to sequence multiple steps
    10. 2.10. Passing values in a sequence of steps
    11. 2.11. Execution order of callbacks used by promises
    12. 2.12. Using a rejection handler at the end of a chain
    13. 2.13. Rejecting a promise by throwing an error in the constructor callback
  3. Chapter 3. Working with Standard Promises
    1. 3.1. The async ripple effect
    2. 3.2. Conditional async step
    3. 3.3. Substituting a resolved promise
    4. 3.4. Encapsulating conditional logic with a promise
    5. 3.5. Caching a promise
    6. 3.6. Running asynchronous tasks in parallel
    7. 3.7. Consolidating the outcomes of parallel tasks with Promise.all()
    8. 3.8. Running code after multiple operations have finished, regardless of their
    9. 3.9. Running tasks in parallel using a loop
    10. 3.10. Overview of array.reduce()
    11. 3.11. Simple array.reduce() to sum numbers
    12. 3.12. Build a sequential chain using a loop
    13. 3.13. Build sequential chain using recursion
    14. 3.14. Conditionally expanding a chain based on the outcome of a preceding promise
    15. 3.15. Manage response time using Promise.race()
    16. 3.16. Verbose pipeline
    17. 3.17. Concise pipeline
  4. Chapter 4. Using Libraries and Frameworks
    1. 4.1. Wrapping a thenable for interoperability
    2. 4.2. Wrap a native promise with a Bluebird promise
    3. 4.3. Using the enclosing scope through function.bind() or aliasing
    4. 4.4. Setting callback contexts using promise.bind()
    5. 4.5. Hiding the bound context from calling code
    6. 4.6. Node-style callback
    7. 4.7. Using promisify to wrap a node-style function
    8. 4.8. Converting arrays into individual arguments using promise.spread()
    9. 4.9. Specifying the execution context for a wrapped function
    10. 4.10. Using a promise-enabled filter and reduce
    11. 4.11. Eager invocation of aggregate functions
    12. 4.12. Exposing a fulfillment value using the enclosing scope
    13. 4.13. Passing on a value using promise.return()
    14. 4.14. Passing on a value using promise.tap()
    15. 4.15. Supplementing a chain with promise.tap()
    16. 4.16. Passing in multiple values with Promise.all()
    17. 4.17. Simple deferred object in jQuery
    18. 4.18. Deferred throws synchronous errors
    19. 4.19. Managing web worker results with deferred objects
    20. 4.20. Creating a deferred object using a standard Promise constructor
  5. Chapter 5. Error Handling
    1. 5.1. Explicitly rejecting a promise
    2. 5.2. Unhandled error rejects a promise
    3. 5.3. Functions that return promises should not throw errors
    4. 5.4. Promise chains built across functions
    5. 5.5. Logging and rethrowing an error
    6. 5.6. Bluebird reporting an unhandled rejection
    7. 5.7. A try/catch block
    8. 5.8. A traditional try/catch/finally block
    9. 5.9. Use catch/then to mimic catch/finally
    10. 5.10. Bluebird's promise.finally()
    11. 5.11. Sample call stack
    12. 5.12. Promise callback breaks up the call stack
  6. Chapter 6. Combining ECMAScript 6 Features with Promises
    1. 6.1. Array destructuring
    2. 6.2. Object destructuring
    3. 6.3. Object destructuring with function parameters
    4. 6.4. Array destructuring with function parameters
    5. 6.5. Destructuring the fulfillment value from Promise.all()
    6. 6.6. Using array.map() with an inline callback
    7. 6.7. Using array.map() with an arrow function
    8. 6.8. Concise pipeline (repeated from earlier chapter)
    9. 6.9. Concise pipeline with arrow functions
    10. 6.10. Using the iterable interface of an array
    11. 6.11. Managing asynchronous image loading using a promise
    12. 6.12. Hypothetical use of loadImage as a synchronous function
    13. 6.13. Using a promise with code that looks synchronous
    14. 6.14. Computing a series of values without using a generator
    15. 6.15. Computing a series of values using a generator
    16. 6.16. Passing values into the generator
    17. 6.17. Configuring an iterator with an initial parameter
    18. 6.18. The parameter in the first call to iterator.next() is always ignored
    19. 6.19. Finite iterations
    20. 6.20. Looping through iterations
    21. 6.21. Using an implicit iterator created by for…of
    22. 6.22. Throwing errors with the iterator
    23. 6.23. Using a promise with code that looks synchronous (repeated from earlier)
    24. 6.24. Sample async wrapper
    25. 6.25. Replacing try/catch with promise.catch()
    26. 6.26. Using async and await as proposed in ES7