🔰await sequentially
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
JS ⟩ async ⟩ await ⟩ promises ⟩ sequentially
await multiple promises sequentially.
replit:awaiting multiple promises, require: measureTime(), futureValue()
async function f() {
// ⭐ awaiting multiple promises "sequentially"
const a = await futureValue(20, 2); // in 2 sec
const b = await
results
measureTime(f); // ⭐ 6.00 sec : f() -> 50