javascript only take 1 decimal from a percentage code example
Example 1: javascript convert int to float with 2 decimal places
float_num.toFixed(2);
Example 2: round to nearest decimal javascript
round(456.7, 2).toFixed(2) // "456.70"
float_num.toFixed(2);
round(456.7, 2).toFixed(2) // "456.70"