<html>
<body>
<p id="demo">Click the button to round the number 1.6 downward to it's nearest integer.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction()
{
document.getElementById("demo").innerHTML=Math.floor(1.6);
}
</script>
</body>
</html>