javascript max decimal places of number code example
Example 1: javascript round to 2 digits
var num = 2;
var roundedString = num.toFixed(2);// 2.00
Example 2: javascript round to 7 decimal places
myNumber.toFixed(7);
var num = 2;
var roundedString = num.toFixed(2);// 2.00
myNumber.toFixed(7);