All challenges
Parallel Work with Promise.all
mediumasync100 XPProblem
Write an async loadDashboard(): Promise<string> that awaits Promise.all over two promises — one resolving to a number of notifications and one to a user name — and returns a summary string. Also write sumAll(values: number[]): Promise<number> that doubles every value in parallel (each as a promise) and sums the results. Note how Promise.all preserves per-position types when given a tuple of differently-typed promises.
Expected output
Ada has 3 notifications
12Hints
Stuck? Reveal hints one at a time.
Solution
Try solving it yourself first — revealing is always available.
Press Run in the editor — your console output is checked automatically.
No errors
Loading...
Console output appears here. Press Run or just type — the code compiles automatically.