Hint
Promise.all preserves input order in results regardless of which promise resolves first.
Promise.all([
Promise.resolve(1),
Promise.resolve(2),
Promise.resolve(3),
]).then(values => console.log(values.join(',')));1,2,3
Explanation: Promise.all waits for all and resolves with an array of values in the original order.
Key Insight: Promise.all preserves input order in results regardless of which promise resolves first.