Edit This Code:
<!DOCTYPE html>
<html>
<body>

<p>Math.round() rounds a number to its nearest integer.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
    document.getElementById("demo").innerHTML = Math.round(4.4);
}
</script>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy