63. The evolution of Asynchronous Javascript
function *foo() {
let x = 1;
yield;
return x;
}
function *bar() {
let x = 14;
let y = (yield) * x;
return y;
}
66. The evolution of Asynchronous Javascript
async function getTotal() {
let userInfo = await loadUserInfo();
let cartItems = await loadCartItems();
let total = await calculateTotal(userInfo, cartItems);
return total;
}