r/javascript • • May 28 '19

What are some JavaScript things beginners don't know?

333 Upvotes

383 comments sorted by

View all comments

Show parent comments

1

u/[deleted] May 29 '19

How about Promise.each() ?

await Promise.each(arrayOfItems, function(item) {

return doSomethingAsync(item)

})

3

u/pm_me_cute_rem_pics js/ux May 29 '19

Promise.each is not vanilla js, but bluebird it looks like. So if you're not using bluebird you can't use Promise.each