for(let i = 0; i < 440; ++i) {...}
const foo = () => {
const max = 439;
let counter = 0;
const next100 = () => {
for (let i = 0; i < 100 && counter <= max; i += 1, counter += 1) {
console.log(counter);
}
if (counter !== max) {
setTimeout(next100, 4000);
}
}
setTimeout(next100, 0);
}
foo();