BigDecimal.prototype.toFixed

Returns a string representation of the BigDecimal rounded to the specified number of digits after the decimal point.

Syntax

toFixed(digits, roundingMode)

Parameters

Return value

A string representing the value.

Examples

123.4567m.toFixed(1)
"123.5"
123.4567m.toFixed(1, "down")
"123.4"