Ed

When requests don't depend on each other, run them in parallel for better performance! Let's fetch multiple users at once.

Your Task:

  • fetchUser(id) returns a promise for one user
  • Create fetchAllUsers(ids) that fetches all users in parallel
  • Use Promise.all() to wait for all requests
  • Return the array of users
  • Compare timing: parallel is faster than sequential!
TypeScript Solution
Loading...

Submit your code to see test results