I need to sequentially iterate through an array of URLs, awaiting asynchronous responses for each, before moving to the next URL.
I was initially expecting this to be synchronous. (I also tried .map
in place of .forEach
)
const urls = [ 'https://url.com', 'https://url.com/difPage', 'https://url.com/difPage2' ]
urls.forEach(async url => {
const data = await performAsyncUrlFunction(url)
})