how to make map function async javascript code example Example: await array of promises await Promise.all(arrayOfPromises)