The most viewed posts

About Desktop Icons in Windows Computer

How to clean up Windows Computer

Driver Booster

CCleaner

Advanced System Care

Myanmar font and keyboard for Windows

Registry Reviver

How to make a computer secure and run faster

some (JavaScript Array Method)

Terms and Conditions

The most viewed items

Desktop Hard Disk

HP ProBook 430

Dell Inspiron 5559

External Hard Disk

SONY Playstation Portable

Laptop RAM

Laptop

ZilaStar ICT Jun 26 2022, 09:47:21
Category : JavaScript Tutorials

Math.round() (JS Math)

<!DOCTYPE html>
<html>
<head>
<title>JavaScript Code Testing</title>
</head>
<body>
<p id = "demo">This is JavaScript Math.round Testing</p>
<button type = "button" onclick = "jsRound()">Math Round</button>

<script>
var a = 4.576;
var b = 4.345;
document.getElementById("demo").innerHTML = a + " and " + b;

function jsRound(){
document.getElementById("demo").innerHTML = Math.round(a) + " and " + Math.round(b);
}
</script>

</body>
</html>

  • Comments:

    No comment to show.

    To Contact
    Available Services
    Terms and Conditions