The async/await is part of the ECMAScript standard ES2017. This construct provides a synchronous-looking experience when dealing with async. Currently, you need something like Babel to run it in the frontend, but for Node.js it is sufficient to run it on version >= 8. Async/await is currently implemented with a concept called generators in the background. Generators are functions that can be exited and re-entered later. To read more about generators, have a look at the following link: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*. It is the new way of dealing with asynchronous code and it really helps make our code look synchronous, which takes away a lot of the cognitive pain associated with asynchronous programming.
Let's remind ourselves of our old example, illustrating the callback hell situation:
getData()
.then...