What is the difference between Callbacks and Promises?
The main difference between Callback Functions and Promises is that we attach a callback to a Promise rather than passing it. So we still use callback functions with Promises, but in a different way (chaining).
Using async await syntax
async…await Advantage
The resulting code is much cleaner
Error handling is much simpler and it relies on try/catch just like in any other synchronous code.
Debugging is much simpler. Setting a breakpoint inside a .then block will not move to the next .then because it only steps through synchronous code. But, you can step through await calls as if they were synchronous calls.