Share via


toFixed Method (JScript 5.6) 

Returns a string representing a number in fixed-point notation.


numObj.toFixed([fractionDigits])

Arguments

  • numObj
    Required A Number object.
  • fractionDigits
    Optional. Number of digits after the decimal point. Must be in the range 0 – 20, inclusive.

Remarks

The toFixed method returns a string representation of a number in fixed-point notation. The string contains one digit before the significand's decimal point, and must contain fractionDigits digits after it.

If fractionDigits is not supplied or undefined, the toFixed method assumes the value is zero.

Requirements

Version 5.5

Applies To: Number Object (JScript 5.6)

See Also

Reference

toExponential Method (JScript 5.6)
toPrecision Method (JScript 5.6)