toFixed Math function to format ( decimal places ) numberWe can use toFixed function in math to format a number upto required decimal places. The value we get is after rounding the number upto the decimal place required. This function is frequently used to format currency, marks etc.
Here is the syntax.
Let us try with some examples with different number values.
to manage total number including decimal places we have to use Pricision function.