ArrayMax
Get the max value from an array
Method Signature
ArrayMax(array=[array])
Arguments
Argument
Type
Required
Description
Default
array
array
true
The array to get max value from
Examples
Simple example with empty array
To get the largest numeric value of an array
someArray = arrayNew( 1 );
writeOutput( arrayMax( someArray ) );
Result: 0
Get largest numeric value of an array
Uses the arrayMax function to get the largest numeric value of an array
someArray = [
23,
45,
87,
1,
4
];
writeOutput( arrayMax( someArray ) );
Result: 87
Get largest numeric value of an array using member function
someArray = [
23,
45,
0,
1,
4
];
writeOutput( someArray.max() );
Result: 45
Additional Examples
aNames = array( 10412, 42, 33, 2, 999, 12769, 888 );
dump( arrayMax( aNames ) );
// member function
dump( aNames.max() );
Related
Last updated
Was this helpful?