Skip to content

Instantly share code, notes, and snippets.

brew upgrade --cask --greedy && brew upgrade
const number = 123456.789;
console.log(new Intl.NumberFormat('en-US', {style: 'currency', currency: 'USD'}).format(number),);
// $123,456.79
console.log(new Intl.NumberFormat('en-US', {style: 'currency', currency: 'TWD'}).format(number),);
// NT$123,456.79
console.log(new Intl.NumberFormat('en-US', {style: 'currency', currency: 'CNY'}).format(number),);
// CN¥123,456.79