Here is example code:
var number = 100.4355; number = number.toFixed(2); alert(number);
The output will be: 100.44
In the above example, I have passed the parameter as ‘2’ in ‘toFixed’ method, because I wanted to format the number with two decimal points. If your requirement is for one decimal point then pass ‘1’ as a parameter.