Use Math.max to get the maximum value among three : max : Math JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Math » max »

 

Use Math.max to get the maximum value among three

















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

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

</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Math
» max