let cnt=0;
let i = setInterval(() => {
console.log(cnt++);
},200)
setTimeout(() => {
clearInterval(i);
},2000);
When executed in browser this code logs:-
0 1 2 3 4 5 6 7 8 9
But when executed using Node it logs:-
0 1 2 3 4 5 6 7 8
What is the reason for this?