Multiple Number Counter

Hello dear Velo experts.
I’m trying to do a number counter on my website which starts counting from zero to a certain number when you open the website.

I found the code but it works only for one number. I need to do 4. can someone explain how to do it? I don’t have much experience in coding.

this is the code I’m using.

the element called “startnumber”
I need to do same with 3 more elements

$w . onReady ( function () {});

let startNum = 0 ;
let endNum = 145 ;
const duration = 20 ;

$w . onReady ( function () {

setInterval (() => { 

    countUp (); 

},  duration ); 

});

function countUp ( ) {

if  ( startNum  <=  endNum ) { 

    $w ( '#StartNumber' ). text  =  startNum . toString (); 
 

    startNum ++; 

} 

}

You need to create separate labels for each new counter.
example:
startNum
endNum
duration
countup

startNum2
endNum2
duration2
countup2

I forget if these are all of them, but you have to make sure that these are separately labeled.