Rounds a number to a specified number of decimal places.
The number to round.
Number of decimal places (default 0).
0
The rounded number.
round(3.14159); // returns 3round(3.14159, 2); // returns 3.14round(1.005, 2); // returns 1.01 Copy
round(3.14159); // returns 3round(3.14159, 2); // returns 3.14round(1.005, 2); // returns 1.01
1.1.0
Rounds a number to a specified number of decimal places.