The Math.round() function in JavaScript is used to round the number passed as parameter to its nearest integer.
Syntax
Math.round(value)
Example
var round =Math.round(9.6)
document.write(``Number after rounding : `` + round)
Result
Number after rounding : 10