Formats a numeric value as a localized currency string.
The numeric value or string to format
The maximum number of fractional digits (default: 2)
The ISO 4217 currency code (default: 'AUD')
Optional
Optional locale string (defaults to system locale)
The localized currency string
formatCurrency(1234.5, 2, 'USD'); // '$1,234.50' Copy
formatCurrency(1234.5, 2, 'USD'); // '$1,234.50'
Formats a numeric value as a localized currency string.