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