DEV Community

Discussion on: 7 Tricks I Use To Rewrite JavaScript Code From My Early Days

Collapse
 
lexlohr profile image
Alex Lohr

It depends. If you want to wait on a list of promises returned by an array of functions, better use await Promise.all(fns.map(fn => fn()), as it will allow you to run them parallel.