Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
An async function walks into a loop
(
ovl.design
)
1 point
by
gabriel34
on Feb 27, 2021
|
hide
|
past
|
favorite
|
1 comment
Zekio
on Feb 27, 2021
[–]
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)))));
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: