I'm just learning backend programming with Node, and very new to how asynchronous programming works. A problem requires me to get data from an array of urls, and return the data in the order they were listed. I used a for loop to get and return the data, essentially looking something like this:
for(let i=0;i<urlArray.length;i++){
http.get(urlArray[i],(response)=>{
//return the response
}
}
How do I do this?