Intl.NumberFormat
I was working on an eCommerce recently and had to format quite a few numbers. Some needed to be rounded to two decimals, others to be shown with a currency, and just as I was starting to be overwhelmed with all the styles - Intl.NumberFormat came to the rescue.
Share