js float two digit code example
Example 1: javascript convert int to float with 2 decimal places
float_num.toFixed(2);
Example 2: get decimals from float javascript
js> 2.3 % 1
0.2999999999999998
float_num.toFixed(2);
js> 2.3 % 1
0.2999999999999998