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

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

March 16th 2017
7m
by @mgaafar 463,723 reads
tldt arrow
EN
Read on Terminal Reader
Read this story w/o Javascript

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

@mgaafar

Mostafa Gaafar

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


Receive Stories from @mgaafar

react to story with heart
Mostafa Gaafar HackerNoon profile picture
by Mostafa Gaafar @mgaafar.Software Engineer @ Amazon London. Likes scalable distributed stuff & JavaScript
Read My Stories

RELATED STORIES

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