paint-brush
6 Reasons Why JavaScript Async/Await Blows Promises Away (Tutorial)by@mgaafar
464,020 reads
464,020 reads

6 Reasons Why JavaScript Async/Await Blows Promises Away (Tutorial)

by Mostafa GaafarMarch 16th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow
EN

Too Long; Didn't Read

Async/await is just syntax sugar built on top of promises. NodeJS supports it out of the box since version 7.6.6. It has been the single greatest addition to JS since 2017. Here are a bunch of reasons with examples why you should adopt it immediately and never look back. It makes asynchronous code look and behave a little more like synchronous code. The advantages add up quickly, which will become more obvious in the following code examples. We didn’t have to write an anonymous function to handle the response. Error handling makes it finally possible to handle both synchronous and asynchronous errors with the same construct.
featured image - 6 Reasons Why JavaScript Async/Await Blows Promises Away (Tutorial)
Mostafa Gaafar HackerNoon profile picture
Mostafa Gaafar

Mostafa Gaafar

@mgaafar

L O A D I N G
. . . comments & more!

About Author

Mostafa Gaafar HackerNoon profile picture
Mostafa Gaafar@mgaafar

TOPICS

Languages

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite