JS: Number.prototype.toLocaleString
Number.prototype.toLocaleString
-
Return a string that represents this number, formatted according to the conventions of the host environment's current locale.
console.log( (123456.789).toLocaleString("en-US"), ); // 123,456.789