Hacker News new | ask | show | jobs
by brn27 3283 days ago
for-await loop behavior is bit complex, but roughly, it's like async await functionality. So, for-await loop wait promise step by step, and if await keyword exists in loop body, wait too. So it's looks like synchronous from inside of async function, but behave as asynchronous promise at outside of async function.