Number.prototype.toLocaleString()
to convert the number to decimal mark format.const toDecimalMark = num => num.toLocaleString('en-US');
toDecimalMark(12305030388.9087); // '12,305,030,388.909'
Subscribe to get resources directly to your inbox. You won't receive any spam! ✌️