Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js format price

formatPrice(value) {
            let val = (value / 1).toFixed(2).replace('.', ',')
            return val.toString().replace(/B(?=(d{3})+(?!d))/g, ".")
        }
 
PREVIOUS NEXT
Tagged: #js #format #price
ADD COMMENT
Topic
Name
1+8 =