const wait = (ms = 1000) => new Promise((resolve) => setTimeout(() => { console.log("resolved"); resolve(); }, ms)); Promise.all(Array.from({ length: 10 }, wait));