Y
Hacker News
new
|
ask
|
show
|
jobs
An async function walks into a loop
(
ovl.design
)
1 points
by
gabriel34
1931 days ago
1 comments
Zekio
1931 days 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)))));
link