Async/Await in Asynchronous Javascript

To handle asynchronous Javascript, callbacks were first used but it had major cons like callback hell. Then came about promises to try to improve things. However, .then chains can also get nested and confusing.
So now, we have async/await, which was introduced in NodeJS 7.6 and is currently supported in all modern browsers.

--

--

--

Software Developer at @thoughtworks | Marathon Runner | Ex-Pharmacist Writing on Coding, Technology and Running

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Adding a filter feature

React Native Super Blazing Fast UI Building Techniques Part 1 — Storybook

Using Cypress with Cucumber to test your app as if you were a user

Cypress command log showing the 3 steps defined in our feature file

TESTTTT -3

Supercharging Visual Regression Testing

Into The Vue (Part 1 Declarative Rendering)

How to Jest (testing in React)

Browser Push Notification

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sherlynn Tan

Sherlynn Tan

Software Developer at @thoughtworks | Marathon Runner | Ex-Pharmacist Writing on Coding, Technology and Running

More from Medium

How to Create a Linked List in JavaScript

Arrays in JavaScript

A Fun, Hacky Way to Handle window.scrollTo

Deleting Elements from Arrays in JS