https://stackoverflow.com/questions/2901102/how-to-format-a-number-with-commas-as-thousands-separators
1000 => 1,000
function numberWithCommas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); }
No comments:
Post a Comment