Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

to 2 decimal places javascript

var discount = Math.round((100 - (price / listprice) * 100) * 100) / 100;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #decimal #places #javascript
ADD COMMENT
Topic
Name
2+2 =