"Multiple" Number Count Up

Hi. I found this code, but it only allows me to have one number count up. It won’t let me redeclare. Any idea or help is appreciated. Also, I need the number to show as a dollar amount. See the screenshot below.

let startNum = 0 ;
let endNum = 23978 ;
const duration = 10 ; // 1000 milliseconds
$w . onReady ( function (){ setInterval (() => { countUp ();}, duration );});
function countUp (){ if ( startNum <= endNum ){ $w ( ‘#text112’ ). text = startNum . toLocaleString (). toString (); startNum ++ ;}}

This one also your POST ???

Hi Velo-Ninja,

No that is not mine but it works. The only issue is I need my number to have a comma. I can put a different text box for the dollar sign.

Please advise how to add a comma.