Count Up Text not working

Hi there, can anyone please help. Trying to make a countup text work with this code but nothing happens :frowning:

let startNum = 0 ;
let endNum = 200854 ;
const duration = 10 ; //1000 milisenconds

$w . onReady ( function () {
setInterval (() => {
countUp ;
}, duration );

});

function countUp ( ) {
if ( startNum <= endNum ) {
$w ( ‘numberText’ ). text = startNum . toLocaleString ();
startNum += 100 ;
}
}


let startNum = 0;
let endNum = 200854;
const duration = 1000; //1000 milisenconds

$w.onReady(()=>{
    setInterval(countUp, duration)
});


function countUp() {
    if (startNum <= endNum) {
        //$w('numberText').text = startNum.toLocaleString();
        console.log(startNum)
        startNum += 100;
    }
}