Use Math.min the get the minimum value among three : min : Math JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Math » min »

 

Use Math.min the get the minimum value among three

















<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
<!--
inp1 = 1;
inp2 = 2;
inp3 = 3;
document.write("The smallest number entered was " + Math.min(inp1, inp2, inp3));

//  -->
</script>
</head>
<body>

</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Math
» min