TE
科技回声
首页
24小时热榜
最新
最佳
问答
展示
工作
中文
GitHub
Twitter
首页
An async function walks into a loop
1 点
作者
gabriel34
大约 4 年前
1 comment
Zekio
大约 4 年前
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>