Computes number rounded to precision.
number
precision
3.10.0
round(4.006)// => 4round(4.006, 2)// => 4.01round(4060, -2)// => 4100 Copy
round(4.006)// => 4round(4.006, 2)// => 4.01round(4060, -2)// => 4100
The number to round.
Optional
The precision to round to.
Returns the rounded number.
Computes
number
rounded toprecision
.Since
3.10.0
Example