Choose where you’d like to start

max()

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> );
ParameterDescriptionData type
<variable>Variable which will contain the returned value.DECIMAL
<numberOne>The number which has to compared with numberTwoNUMBER or DECIMAL
<numberTwo>The number which has to compared with numberOneNUMBER or DECIMAL

Examples

numOne = 100;
numTwo = 200;
maxValue = numOne.max(numTwo);    // returns 200

Get Started Now

Execute