Rick Viscomi @rviscomi.dev · Jan 7

Which do you prefer? 🅰️ for..of 🅱️ for await..of I really like how for await..of feels like a regular old synchronous loop, with no concern for yielding, and everything is encapsulated away in the async generator function But the simplicity of for..of wins IMO

8 likes 3 replies

?

Replies

Tim Vereecke · Jan 7

Definitely A

Vinicius Dallacqua · Jan 7

for..of just looks cleaner tbh 😅

Rick Viscomi · Jan 7

Here are the guts of yieldToMain if it helps (it only yields when necessary, not every iteration)