async/await – the future of asynchronous programming

To be honest, async/await blows away whatever you read previously about promises. But hey! You obviously need to know how promises work in order to know how to work with async/await. async/await are built on top of promises; however, once you get used to them, there is no going back to promises (unless, again, you need to convert a callback type API to async/await (you need to use promises for that).)

About async/await:

  • It's for asynchronous coding
  • It makes code look extremely similar to synchronous coding and thus makes it extremely powerful and easy on the eyes
  • It is built on top of promises
  • It makes error handling a cake walk. You can finally use try and catch with asynchronous coding! ...

Get Learn ECMAScript - Second Edition 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.