Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript currency format

const formatter = new Intl.NumberFormat('en-ID', {
  style: 'currency',
  currency: 'IDR'
}).format(10000000)
.replace(/[IDR]/gi, '')
.replace(/(.+d{2})/, '')
.trimLeft()


console.log(`Rp ${formatter}`)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #currency #format
ADD COMMENT
Topic
Name
2+4 =