JavaScript Math Object : max()

The max() method returns the number with the highest value. Syntax :
  Math.max(num1, num2, num3, ....num_N);
Example :
<script>
  var x = Math.max(12, 23, 10, 25, 45, 100, 68);
  document.write("max(12, 23, 10, 25, 45, 100, 68) : " + x + "<br/>");
  var x = Math.max(-10, -20, -1, -100, -15);
  document.write("max(-10, -20, -1, -100, -15) : " + x + "<br/>");
</script>
Output :


Next Topic :