Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

adding commas after thousand

let num = 1234567.89;
let commas = num.toLocaleString("en-US");
 commas = num.toString().replace(/B(?=(d{3})+(?!d))/g, ",");
 
PREVIOUS NEXT
Tagged: #adding #commas #thousand
ADD COMMENT
Topic
Name
8+2 =