DEV Community

Discussion on: + async/await

havespacesuit profile image
Eric Sundquist

Using Promise.all( (item) => asyncFunc(item)) looks pretty, but if you have thousands of items, it can eat a lot of your browser's resources managing all those promises. If resource consumption is a concern, there is nothing wrong with for (const item of items) { await asyncFunc(item) }.