Use Math.min the get the minimum value among three : min « Math « JavaScript Tutorial






<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>








9.18.min
9.18.1.Math.min()
9.18.2.Find the minimum number by using the Math.min
9.18.3.Finding the maximum and minimum number
9.18.4.Use Math.min the get the minimum value among three