See more
If you want to wait until the loop is finished, you either need a regular for loop (which will run in series), or a Promise.all (which will run concurrently):
for
Promise.all