for (let i = -2e9; i < 2e9; i++) {
console.log(i);
}
const generator = (function* () {
for (let i = -2e9; i < 2e9; i++) {
yield console.log(i);
}
}());
while(!generator.next().done);
let number = -2e9;
let timer = setInterval(
() => {
console.log(number);
number += 1;
if (number > 2e9) {
clearInterval(timer);
}
},
1
);