Closed
Description
About this example:
eslint-plugin-github/docs/rules/array-foreach.md
Lines 83 to 100 in a8ec7ad
The following code creates N async promises in parallel and wait until they are all completed (it polishes all apples at the same time until they are all polished):
await Promise.all(
apples.map(polishApple)
)
The following code awaits for each async call individually (it polishes 1 apple at time until they are all polished).
for (const apple of apples) {
await polishApple(apple)
}
This is a refactor changing substantially the behaviour of the code.
Metadata
Metadata
Assignees
Labels
No labels