Building Your Learning Module...
Getting things ready for you!
Find videos you like?
Save to resource drawer for future reference!
Display numbers with proper thousand separators, decimal points, currency symbols, and percentage signs based on the user's locale.
new Intl.NumberFormat(locale, options)formatter.format(number)Language/region code for number formatting
"en-US" - US (1,234.56)"de-DE" - German (1.234,56)"fr-FR" - French (1 234,56)Configuration object for formatting
style - decimal, currency, percent, unitcurrency - Currency code (USD, EUR, etc.)notation - standard, scientific, compactdecimal - Plain numbers (default)currency - Money with symbolspercent - Percentage valuesunit - Measurements (km, kg, etc.)standard - Regular formatscientific - 1.23E6engineering - 1.23E+6compact - 1.2MminimumFractionDigits - Min decimalsmaximumFractionDigits - Max decimalsminimumIntegerDigits - Min integer digitsuseGrouping - Show separatorssignDisplay - Show +/- signscurrencyDisplay - Symbol vs codeFormat numbers with locale-specific separators
Display prices with currency symbols
Control how currency symbols are shown
Display percentages correctly
Control decimal precision
Display large numbers in short form
Format measurements with units
decimal, currency, percent, and unit
Display 1.5M instead of 1,500,000
Set min/max fraction digits
Support all world currencies (USD, EUR, JPY, etc.)