News for hackers. Stuff that matters.
Re:Unravelling `Async for` Loops by fregante on Wednesday September 15, 2021 @12:13AM (#28535204)
Thanks! I think it wouldn’t await the whole loop though

  for (const item of iterable)
    async do {
      await item()
    }
This would be equivalent to

  Promise.all(arr.map(async item => {
    await item()
  })
Notice the lack of await before Promise.all

There are no comments on this comment yet.