Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
An async function walks into a loop (ovl.design)
1 point by gabriel34 on Feb 27, 2021 | hide | past | favorite | 1 comment


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: