min() - Number Functions | Zoho QEngine Help

min()

In a nutshell
The min() function takes two numbers as arguments and returns the smaller of the two as a decimal value. Both parameters accept number or decimal data types. It is useful in test scripts where you need to compare two numeric values and work with the lower result.

Overview

The min() function takes numberOne and numberTwo as arguments, and returns the smaller number of the two.

Return Type

  • Decimal

Syntax

  1. <variable> = <numberOne>.min(<numberTwo> );

(OR)

  1. <variable> = min( <numberOne>, <numberTwo> );

ParameterDescriptionData type
<variable>Variable which will contain the returned value.DECIMAL
<numberOne>The number which has be compared with numberTwo.NUMBER or DECIMAL
<numberTwo>The number which has be compared with numberOne.NUMBER or DECIMAL

Examples

  1. numOne = 100;
  2. numTwo = 200;
  3. minValue = numOne.min(numTwo);       // returns 100