In JavaScript, in the array of promises (can have n promises), run first n promises, when finished, run another n;
Example:
const promises = [Promise_1, Promise_2, Promise_3, Promise_4, Promise_5, Promise_6];
Run Promise_1 and Promise_2, when both finish, run Promise_3, Promise_4, then Promise_5, Promise_6.
axios.post(‘/api’)
axios.post(‘/api’)
WAIT
axios.post(‘/api’)
axios.post(‘/api’)
WAIT
axios.post(‘/api’)
axios.post(‘/api’)
Tried with Promise.all, for of loop, async/await…
2
Answers