Round a number to the nearest integer:
The result will be:
The round() method rounds a number to the nearest integer.
Note: 2.49 will be rounded down, 2.5 will be rounded up.
The round() method is supported in all major browsers.
|x||Required. The number to be rounded|
|Number||The nearest integer|
Round different numbers to the nearest integer:
The result of a,b,c,d,e, and f will be:
Your message has been sent to W3Schools.