Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript format rupiah

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

console.log(`Rp ${formatter}`)
 
PREVIOUS NEXT
Tagged: #javascript #format #rupiah
ADD COMMENT
Topic
Name
5+3 =