aweber-banner

How to Format Currency in ES6

In this tutorial, we will learn about How to Format Currency in ES6.


We can use NumberFormat instance to format any number into a currency value


const price= 10000;

new Intl.NumberFormat('en-US',
  { style: 'currency', currency: 'USD' }
).format(money); 
// '$100.00'