JavaScript » Number » toFixed

Syntax:
object.toFixed(fractionDigits)

This method returns a string containing the number represented in fixed-point notation with fractionDigits following the decimal point.

If fractionDigits is not defined, the value 0 is assumed. The valid range for fractionDigits is 0 to 20.