Standard built-ins

Intl.NumberFormat

Try the free JavaScript compiler

Locale-aware number display; specify currency with currency style; this does not convert currency.

Formal Syntax & Structure

javascript syntaxjavascript
new Intl.NumberFormat([locales], [options])

Parameters & Attributes

NameTypeDescription
localesString | ArrayRequested locale tag or prioritized locale list.
optionsObjectFormatting options.

Return Value

Intl.NumberFormat

New formatter.

Working Example

Example Snippetjavascript
console.log(new Intl.NumberFormat("en-US",{useGrouping:false}).format(12));
JavaScript Reference