Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
An async function walks into a loop
(opens in new tab)
(ovl.design)
1 points
gabriel34
5y ago
1 comments
Share
An async function walks into a loop | Better HN
1 comments
default
newest
oldest
Zekio
5y ago
I thought you could just add async to the function inside the forEach, like this:
const baz = foo.forEach(async (bar) => await (new promise(() => console.log(bar)))));
j
/
k
navigate · click thread line to collapse