JavaScript floor() Method

The floor() method rounds a number DOWNWARDS to the nearest integer, and returns the result.
If the passed argument is an integer, the value will not be rounded.




First, make an HTML file with a name like program.html:


<html>
<head>
<title>
Java Script Web Site

</title>
</head>
<body>
<pre><script src="script.js">

</script></pre>
</body>
</html>

Then, make a file in the same directory with a name like   script.js:




function convertion(value){
var  convert=Math.floor(value);
document.writeln("<b>floor Value  Convert  into  integre:</b>  <h1>"+  convert+"</h1>");
}
convertion(19.6);