From http://www.w3schools.com (Copyright Refsnes Data)
JavaScript Math Object
The max() method returns the number with the highest value of two specified numbers.
| Math.max(x,y) |
| Parameter | Description |
|---|---|
| x | Required. A number |
| y | Required. A number |
ExampleReturn the number with the highest value of two specified numbers:
The output of the code above will be:
Try it yourself » |
JavaScript Math Object
From http://www.w3schools.com (Copyright Refsnes Data)