From http://www.w3schools.com (Copyright Refsnes Data)
Complete Math Object Reference
The round() method rounds a number to the nearest integer.
| Math.round(x) |
| Parameter | Description |
|---|---|
| x | Required. A number |
ExampleIn this example we will round different numbers with the round() method:
The output of the code above will be:
Try it yourself » |
Complete Math Object Reference
From http://www.w3schools.com (Copyright Refsnes Data)