You have been referred to this item:
How to insert thousands separators into a number...
>> "1283475822347".replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,"); "1,283,475,822,347"