A utility function that formats a number in specified locale
formatNumber(123456.789, 'de-DE') // 123.456,789 Copy
formatNumber(123456.789, 'de-DE') // 123.456,789
formatNumber(123456.789, 'en-US') // 123,456.789 Copy
formatNumber(123456.789, 'en-US') // 123,456.789
The number to format
The locale to use for formatting
A string representation of the number in the specified locale
A utility function that formats a number in specified locale
Example
Example