Find the maximum number by using the Math.max : max « Math « JavaScript Tutorial






<html>
<head>
<title>Finding the maximum number</title>
<script type="text/javascript" language="javascript">
<!-- //
function f(){
   var MaxNum = Math.max(1,2,3);

   document.write(MaxNum);
}
// -->
</script>
</head>
<body onload="f()">
</body>
</html>








9.17.max
9.17.1.Math.max()
9.17.2.Find the maximum number by using the Math.max
9.17.3.Finding the maximum and minimum number
9.17.4.Use Math.max to get the maximum value among three