max()
Table of Contents
Overview
The max() function takes numberOne and numberTwo as arguments, and returns the bigger number of the two.
Return Type
- Decimal
Syntax
<variable> = <numberOne>.max( <numberTwo> );
(OR)
<variable> = max(<numberOne>, <numberTwo> );
Parameter | Description | Data type |
---|---|---|
<variable> | Variable which will contain the returned value. | DECIMAL |
<numberOne> | The number which has to compared with numberTwo | NUMBER or DECIMAL |
<numberTwo> | The number which has to compared with numberOne | NUMBER or DECIMAL |
Examples
numOne = 100;
numTwo = 200;
maxValue = numOne.max(numTwo); // returns 200
numTwo = 200;
maxValue = numOne.max(numTwo); // returns 200