- Math.round() Method Example
This above syntax, you will be see function accepts a single parameter. This is the number that you want to round.
Math.round() Method Examples
In this math.round () function example, we have passed the value in math.round function 6.6 and this function will round off our value and return it to us 7
var round =Math.round(6.6); document.write("Number After Round : " + round);
Let’s see with nagetive value example – In this math.round () function, we have passed the nagetive value in math.round function -6.6 and this function will round off our value and return it to us -7
var round =Math.round(-6.6); document.write("Number After Round : " + round);