Applies to: Math Object
The max method is use to get the greater of two supplied numeric expressions.
Syntax
retVal = Math.max(number1, number2)
The max method syntax has these parts:
Part |
Description |
retVal |
The greater of number1 or number2. |
number1 |
A numeric expression to be compared to number2. |
number2 |
A numeric value to be compared to number1. |
Return value
Returns the greater of two supplied numeric expressions.
See also: Math Object Methods, min Method |