I have script like this below.
It start multiple API access.
var temp = [];
for (let i = 0; i < `10;i++){
var url = `http://www.myapi.com/api/?id=${i}`;
axios.get(url).then(res =>{
temp[i] = res['data'];
//I want to do something if every API get the results.
}).catch(res => {
console.log("axios error");
});
}
Now I want to wait every 10 api access finished.
Is it possible or how can I do this?