-
Counter script: space between numbers
Hi !
I want to do a counter to 100 000 to 1 000 000.
Here is the script I use:
startT = 1;
endT = 5;
beginVal = 100000;
endVal = 1000000;
t = linear(time,startT,endT,beginVal,endVal);
t.toFixed(0)Everything is working fine. But I would like to keep the space between the numbers (100 000 instead of 100000)
A friend told me to put this script ” .replace(/(d{3})/gi, ‘$1 ‘) ” at the end of my script. It work with 100 000 but not for 1 million: 100 000 0
Someone can help me ?
thank you !