|
|
|
|
|
by spiralx
3005 days ago
|
|
Your example is equal to await getThingAtIndex(1)
await getThingAtIndex(2)
await getThingAtIndex(3)
whereas the async for loop is equivalent to await Promise.all([
getThingAtIndex(1),
getThingAtIndex(2),
getThingAtIndex(3)
])
Your example is valid syntax, but it executes each call synchronously. |
|