NumberFormat
new Intl.NumberFormat('de-DE').format(1234567.89); // '1.234.567,89' (German format)
format() converts a number to a locale-specific string with proper separators.
Use Intl.NumberFormat to format a number.