I am fetching multiple route using for loop and saving its result this is my code
for (let i = 0; i < datesToFetch.length; i++) {
fetch("http://localhost:3000/areaChart/"+datesToFetch[i]+"/"+datesToFetch[i+1])
.then(response => response.json())
.then(response => console.log(response))
}
whats really weird that order of data that I am getting is coming random order it is not coming according to for loop ascending order which is really important in this case
what should I do so I get data in proper order ?