Math.max() Method

Math Max Method
Math.max() method is used to return the largest number. If we give the two are more number in the argument we want to find the largest number. We can use this max method. If we don't give the any number it will return the - infinity value.

Syntax:
Math.log(value 1, value 2, ..);

Example:
<script>
    var one = Math.max(5, -2, 10);
    document.writeln('Output of 5, -2 , 10 is : ' + one + '</br></br>');
    var two = Math.max(100,-80, 70);
    document.writeln('Output of 100,-80, 70 is : ' + two + '</br></br>');
    var three = Math.max();
    document.writeln('Output of  is : ' + three + '</br></br>');
    var four = Math.max(88, 50, 30);
    document.writeln('Output of 88, 50, 30 is : ' + four + '</br></br>');
</script>

Output:
Output of 5, -2 , 10 is : 10

Output of 100,-80, 70 is : 100

Output of is : -Infinity

Output of 88, 50, 30 is : 88

Copyright Labw3