Math.floor()
The Math.floor() method is the floor function. Math.floor() rounds numbers down to the nearest integer value.
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
<script type="text/javascript">
document.writeln(Math.floor(25.9)); //25
document.writeln(Math.floor(25.5)); //25
document.writeln(Math.floor(25.1)); //25
</script>
</head>
<body>
</body>
</html>