03. Await Expression
Handling a single asynchronous result
async function asyncFunc() {
const result = await otherAsyncFunc();
console.log(result);
}
// Equivalent to:
function asyncFunc() {
return otherAsyncFunc().then(result => {
console.log(result);
});
}Detach promise from await
Handling multiple asynchronous results in parallel
Last updated