Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 505 Bytes

format_number_as_currency.md

File metadata and controls

12 lines (8 loc) · 505 Bytes

Format number as currency string (money)

(new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' })).format(99999);
  • new Intl.NumberFormat - instantiates JS native formatter (docs)
  • style: 'currency', currency: 'USD' - pick currency style and set the currency itself
  • 99999 - number we're going to format as money

link_youtube: https://youtu.be/-aOFjol0EbU