Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript format numbers with commas

function numberWithCommas(x) {
    return x.toString().replace(/B(?=(d{3})+(?!d))/g, ",");
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #format #numbers #commas
ADD COMMENT
Topic
Name
8+8 =