javascript format rupiah
const numb = 1000000;
const format = numb.toString().split('').reverse().join('');
const convert = format.match(/\d{1,3}/g);
const rupiah = 'Rp ' + convert.join('.').split('').reverse().join('')
console.log(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}`)
Also in JavaScript:
- js data object length
- javascript create range with a loop
- utiliser les données passees a un modal dans son propre composant en angular
- add array to array javascript
- javascript uncheck radio button
- get element by tag name
- pub js npm
- (node:14372) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGHUP listeners added to [process]. Use emitter.setMaxListeners() to increase limit
- ion button transparent
- how to expand compressed js file vscode
- how to sum two var in jquery
- js when you leave
- jquery if attribute
- android center text react native
- how to write and read a text file in jdiscord.js
- proactive vs reactive
- avoid compressing imagepicker react native
- how can we take selected index value of dropdown in javascript
- javascript keep scroll visible
- how to make fizzbuzz in javascript
- react-native-safe-area-context
- js class static
- jquery on click return link url
- filter items javascript