Aggregate Return Values of Multiple Async Functions Run in Parallel and in Series

Write a utility that accepts an array of async functions, runs them either in parallel (using Promise.all) or in series (sequentially chained), and then sums or aggregates their resolved return values into a single result. Handle mixed numeric and non-numeric return values gracefully. This tests mastery of orchestrating multiple async flows and is a common real-world scenario in dashboards that combine multiple independent API results.

Examples
Input: []
Output:
Hints

Aggregate Return Values of Multiple Async Functions Run in Parallel and in Series

Write a utility that accepts an array of async functions, runs them either in parallel (using Promise.all) or in series (sequentially chained), and then sums or aggregates their resolved return values into a single result. Handle mixed numeric and non-numeric return values gracefully. This tests mastery of orchestrating multiple async flows and is a common real-world scenario in dashboards that combine multiple independent API results.