How can I add currency counter

I have the code below but cannot get it to separate by a comma and decimal point.
$w.onReady( function () {
let startNum = 14000000000;
let endNum = 14100000000;
const duration = 10; // 1000 macroseconds

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

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