TE
TechEcho
Home
24h Top
Newest
Best
Ask
Show
Jobs
English
GitHub
Twitter
Home
An async function walks into a loop
1 points
by
gabriel34
about 4 years ago
1 comment
Zekio
about 4 years ago
I thought you could just add async to the function inside the forEach, like this:<p><pre><code> const baz = foo.forEach(async (bar) => await (new promise(() => console.log(bar)))));</code></pre>