Writing JavaScript apps on the backend or the frontend?

Almost everything new in JavaScript is built on Promises and async functions, and even the existing features of the language are starting to migrate to the new structure.

But they are not just keywords that magically make something async work with the rest of the program. Async changes how the function work and that can lead to errors without proper understanding.

From this book, you'll build an understanding on how Promises and async/await work and you'll be familiar with the common problems and their solutions.

Already have a license key? Sign in here

Book + video course

26
Chapters
100+
Pages
Last updated

Video course

Lessons

Introduction
What you'll learn04:30
Asynchronous programming in JavaScript07:55
Async/await basics
Async functions05:11
Await08:09
Special case: returning Promises04:47
Promises
The Promise constructor07:35
Promises states05:50
Error handling
Error handling in async functions03:45
Error handling in the Promise constructor04:37
Async performance
Parallel processing07:18
Promisification
Callback styles05:48
Promisification07:19
Miscellaneous
Useful functions06:57
Common errors13:25
Example codes10:04
Outro
Congratulations00:42

About the author

Tamás Sallai

I'm a software developer focusing mostly on cloud computing and web technologies. I'm especially interested in how to handle edge cases to end up with dependable software.

I find asynchronous programming fascinating as when everything works perfectly it feels like magic as various parts of a program are doing their things without interfering with each other. On the other hand, concurrency brings a lot of edge cases that can lead to bugs that are very hard to debug and fix. I enjoy thinking about these "what can go wrong" scenarios and observe a program that works well in many different conditions.

My books and courses:

Author image

Table of contents

  • Introduction Preview
  • Getting started with async/await Preview
  • Parallel and sequential processing
  • Returning multiple values Preview
  • Convert between Promises and callbacks
  • Promise timeouts
  • The async serializer pattern
  • The async disposer pattern
  • Retrying async operations
  • Paginating with async generators
  • Using async functions with postMessage
  • Collection processing with async functions
    • Async for iteration
    • Async functions with reduce
    • Async functions with map
    • Async functions with forEach
    • Async functions with filter
    • Async functions with some/every
  • Common errors
  • Glossary
  • About the author
  • Changelog
  • Copyright

Buying options

Promises and Async/Await in JavaScript & Async/await in JavaScript

Book cover Video course cover
Includes:
  • Lifetime access to the book and the course
  • All future updates
  • Web, PDF, and Epub versions
Buy for $79.95

Books & Courses package

Need a team license? Send an email to tamas.sallai@advancedweb.hu and we'll figure something out.