<html>
<body>
<h1>Math.trunc()</h1>
<p>Click the button to display the iteger part of 8.76.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = Math.trunc(8.76);
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_trunc by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 05 Jun 2019 14:02:25 GMT -->
</html>