How to format number with commas in javascript
var numberWithCommas = function(x)
{
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
};
Just another Yipp.ca Blogs site
var numberWithCommas = function(x)
{
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
};
Recent Comments