From Callbacks and Promises to Async Functions with ES8

From Callbacks and Promises to Async Functions with ES8

This article is more of a primer on the history of writing asynchronous code with pure vanilla JavaScript. Feel free to skip to the end if you are solely interested in async functions with ES8 (a.k.a. ES2017). All of the examples below depend on each other. You should be able to follow along by pasting them one after the other into a file. The required new Javascript functionalities are available in Node.js 8 and any recent version of Chrome, Firefox, Safari, Opera and Edge.