I have a counter number incrementing from 0 to a given number(percentage). I want to increment it in steps of one after every few miliseconds.
let count = 0;
let percentage = 99;
let intervalID = setInterval(function (){
count++;
console.log(count) // prints values from 1 through 99
if (count === percentage) {
clearInterval(intervalID);
}
},200);
But the count on the view is not updating