JS ⟩ async ⟩ await ⟩ promises ⟩ sequentially
await multiple promises sequentially.
async function f() {
// ⭐ awaiting multiple promises "sequentially"
const a = await futureValue(20, 2); // in 2 sec
const b = await futureValue(30, 4); // in 4 sec
return a + b;
}
measureTime(f); // ⭐ 6.00 sec : f() -> 50