JavaScript Math.round()
JavaScript Math.round()
The Math.round() method is used to round a number to the nearest integer.
Syntax:-
Its syntax is:- Math.round(x)
Return:-
Its return is:- a rounded number to its nearest integer
Further Explanation:-
Parameter | Description |
---|---|
x | Required. The number. |