Rounds a number to a given precision
round(1.23) // 1round(1.55) // 2round(1.333, 2) // 1.33round(1.2345, 3) // 1.234 Copy
round(1.23) // 1round(1.55) // 2round(1.333, 2) // 1.33round(1.2345, 3) // 1.234
value to round
Optional
precision to round to
Rounds a number to a given precision
Example