TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

An async function walks into a loop

1 pointsby gabriel34about 4 years ago

1 comment

Zekioabout 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) =&gt; await (new promise(() =&gt; console.log(bar)))));</code></pre>