I am working on old project that doesn't supports ES6 standards.
For ease of understanding i will write the code i am trying to reach, Please translate the following code without using async/await pair.
async function doSomeCalls(arrayWithNeededCalls){
for(let i = 0; i < arrayWithNeededCalls.length; i++){
await makeSomeCall(arrayWithNeededCalls[i]);
console.log("Call: ", i, " Completed going to next one");
}
}
I tried to use
Promise.all()
But it doesn't wait one promise to be completed before running second one.