Hello Friends, If you want to display any number with two decimal digits then you need to use toFixed() JavaScript function during parsing the float number.
Example : I want to display cart total amount with two decimal places only. Let say actual total amount is 123.4567 and I want to display amount is 123.45 only
var value = 123.4567;
var twoPlacedFloat = parseFloat(value).toFixed(2);
alert(twoPlacedFloat);
If you want to display number with more the two digits then you can change value under toFixed() function. Let say if want to display number up to 4 digits then pass 4 value in toFixed function, i.e toFixed(4)
Enjoy!