#TIL WebAPI: Intl.NumberFormat

Published on 2022-11-09 · JavaScript Programming Today I Learned

Recently I found very handful function for formatting numbers, currency or units — Intl.NumberFormat, which formats values for given language and region.

The Intl object is the namespace for the ECMAScript Internationalization API, which provides language sensitive string comparison, number formatting, and date and time formatting. The Intl object provides access to several constructors as well as functionality common to the internationalization constructors and other language sensitive functions.1

Recently I found very handful function for formatting numbers, currency or units — Intl.NumberFormat, which formats values for given language and region.

Documentation: Intl.NumberFormat on MDN

Sources:

Footnotes

  1. MDN Web Docs