Async & Promises
Execute Async Tasks in Sequence
mediumJS SpecificJS / TS3 tests
Problem Statement
Implement `asyncSequence(tasks)`, which takes an array of asynchronous factory functions (functions returning promises) and executes them one after another in strict sequential order. It should return a promise resolving to an array of all results in order.
Examples
Example 1: const t1 = async () => 1; const t2 = async () => 2; await asyncSequence([t1, t2]); // [1, 2]
JavaScript & TypeScript starter code included
Run this as a live interviewPractice solo
3 test cases. No second person needed.