Skip to content

Instantly share code, notes, and snippets.

@hoyangtsai
Created December 12, 2022 02:13
Show Gist options
  • Save hoyangtsai/b66cd4b3b34e801ac746cf9a0f80e831 to your computer and use it in GitHub Desktop.
Save hoyangtsai/b66cd4b3b34e801ac746cf9a0f80e831 to your computer and use it in GitHub Desktop.
currency format with Intl.NumberFormat
const amount = new Intl.NumberFormat('id-ID', {
style: 'currency',
currency: 'IDR'
}).format("15000");
console.log(amount);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment