Using ES2017 Async Functions

ES2017 was finalized in June, and with it came wide support for my new favorite JavaScript feature: async functions! If you’ve ever struggled with reasoning about asynchronous JavaScript, this is for you. If you haven’t, then, well, you’re probably a super-genius.
Async functions more or less let you write sequenced JavaScript code, without wrapping all your logic in callbacks, generators, or promises. Consider this:
function logger() {
let data = fetch(‘http://sampleapi.com/posts’)
console.log(data)
}
logger()
This code doesn’t do what …

Using ES2017 Async Functions is a post from CSS-Tricks

Link: https://css-tricks.com/using-es2017-async-functions/