Usage
// example.jsconst Promise_serial = ; const promises = Array15 ; console;
node example.js
prints:
### Run all promises in sequence
promise 0 start
promise 0 end
promise 1 start
promise 1 end
promise 2 start
promise 2 end
promise 3 start
promise 3 end
promise 4 start
promise 4 end
promise 5 start
promise 5 end
promise 6 start
promise 6 end
promise 7 start
promise 7 end
promise 8 start
promise 8 end
promise 9 start
promise 9 end
promise 10 start
promise 10 end
promise 11 start
promise 11 end
promise 12 start
promise 12 end
promise 13 start
promise 13 end
promise 14 start
promise 14 end
### Run all promises in series of 5
promise 0 start
promise 1 start
promise 2 start
promise 3 start
promise 4 start
promise 0 end
promise 1 end
promise 2 end
promise 3 end
promise 4 end
promise 5 start
promise 6 start
promise 7 start
promise 8 start
promise 9 start
promise 5 end
promise 6 end
promise 7 end
promise 8 end
promise 9 end
promise 10 start
promise 11 start
promise 12 start
promise 13 start
promise 14 start
promise 10 end
promise 11 end
promise 12 end
promise 13 end
promise 14 end
### Run all promises in series of 10
promise 0 start
promise 1 start
promise 2 start
promise 3 start
promise 4 start
promise 5 start
promise 6 start
promise 7 start
promise 8 start
promise 9 start
promise 0 end
promise 1 end
promise 2 end
promise 3 end
promise 4 end
promise 5 end
promise 6 end
promise 7 end
promise 8 end
promise 9 end
promise 10 start
promise 11 start
promise 12 start
promise 13 start
promise 14 start
promise 10 end
promise 11 end
promise 12 end
promise 13 end
promise 14 end
Resolved values: ["output-0","output-1","output-2","output-3","output-4","output-5","output-6","output-7","output-8","output-9","output-10","output-11","output-12","output-13","output-14"]