Promises and Async/Await
IntermediateFill in the promise and async/await syntax.
To create a promise: new ((resolve, reject) => { ... })
To handle a resolved promise: promise.(result => ...)
To handle a rejection: promise.(err => ...)
To pause execution and wait for a promise inside an async function: fetchData()
A function that returns a promise is declared with the keyword.