Here is the code I am using
let startNum = 0 ;
let endNum = 8417000 ;
const duration = 20 ;
$w . onReady ( function () {
setInterval (() => {
countUp ();
}, duration );
});
function countUp () {
**if** ( startNum <= endNum ) {
$w ( '#numberText' ). text = startNum . toLocaleString ();
startNum += 84170 ;
}
}