Standard built-ins
Intl.NumberFormat.prototype.format()
Bound formatting function returning locale-sensitive numeric display text. Supports Number, BigInt and numeric strings in modern implementations; exact output depends on data and options.
Formal Syntax & Structure
javascript syntaxjavascript
formatter.format(value)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| value | Number | BigInt | String | Numeric value interpreted according to formatter. |
Return Value
String
Localized number text.
Working Example
Example Snippetjavascript
console.log(new Intl.NumberFormat("en-US",{useGrouping:false,minimumFractionDigits:2}).format(3));