Returns the smallest numeric value in an array. If the array parameter value is an empty array, returns zero. All elements must contain values that can be automatically converted to numeric values.
arrayMin(array)
returns numeric
someArray.min()
Name | Type | Required | Default | Description |
---|---|---|---|---|
array | array | Yes | An array or variable name |
To get the smallest numeric value of an array
someArray = arrayNew(1);
writeOutput(arrayMin(someArray));
Uses the arrayMin function to get the smallest numeric value of an array
someArray = [23,45,87,2,4];
writeOutput(arrayMin(someArray));
CF11+ Lucee4.5+
someArray = [23,45,99,1,4];
writeOutput(someArray.Min());