round
round()
Section titled “round()”Category: Math
Returns the input rounded to the specified number of decimal places
Signature
Section titled “Signature”- Return type:
number - Parameters:
precisioninteger— Number of decimal places (optional, defaults to 0)
Examples
Section titled “Examples”3.14159.round(2)3.6.round()(-2.5).round()