6 Reasons Why JavaScript Async/Await Blows Promises Away (Tutorial)ā€‚by@mgaafar
463,773 reads
463,773 reads

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

by Mostafa Gaafar7mMarch 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.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail

Coins Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - 6 Reasons Why JavaScript Async/Await Blows Promises Away (Tutorial)
Mostafa Gaafar HackerNoon profile picture
Mostafa Gaafar

Mostafa Gaafar

@mgaafar

Software Engineer @ Amazon London. Likes scalable distributed stuff & JavaScript

About @mgaafar
LEARN MORE ABOUT @MGAAFAR'S
EXPERTISE AND PLACE ON THE INTERNET.

Share Your Thoughts

About Author

Mostafa Gaafar HackerNoon profile picture
Mostafa Gaafar@mgaafar
Software Engineer @ Amazon London. Likes scalable distributed stuff & JavaScript

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
L O A D I N G
. . . comments & more!