SyntaxFix
Write A Post
Hire A Developer
Questions
I use this:
function numberWithCommas(number) { return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); }
source: link