convert to 2 digit decimal javascript code example
Example 1: javascript convert string to 2 decimal
var twoPlacedFloat = parseFloat(yourString).toFixed(2)
Example 2: to 2 decimal places javascript
var discount = Math.round((100 - (price / listprice) * 100) * 100) / 100;