Sequential Async

Medium

Prompt

Write a function executeInSeries that takes an array of asynchronous functions and executes them one after another, in order. Each function should only start after the previous one has completed.

  • The function should accept an array of async functions as input.
  • Each function in the array must finish executing before the next one starts.
  • The function should return a Promise that resolves when all functions have completed.