amount
.toFixed(2)
.toString()
.replace(/\B(?=(\d{3})+(?!\d))/g, ",")
// or
amount
.toLocaleString('en-US', { style: 'currency', currency: 'USD' });
amount
.toFixed(2)
.toString()
.replace(/\B(?=(\d{3})+(?!\d))/g, ",")
// or
amount
.toLocaleString('en-US', { style: 'currency', currency: 'USD' });