Settings

Theme

An async function walks into a loop

ovl.design

1 points by gabriel34 5 years ago · 1 comment

Reader

Zekio 5 years ago

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)))));

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection