Math.min(inp1, inp2, inp3)
<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
inp1 = 1;
inp2 = 2;
inp3 = 3;
alert("The largest number entered was " + Math.max(inp1, inp2, inp3));
alert("The smallest number entered was " + Math.min(inp1, inp2, inp3));
</script>
</head>
<body>
</body>
</html>
Related examples in the same category