ArrayMin

Return length of array

Method Signature

ArrayMin(array=[any])

Arguments

Argument
Type
Required
Description
Default

array

any

true

The array to get min value from

Examples

Simple example with empty array

To get the smallest numeric value of an array

Run Example

someArray = arrayNew( 1 );
writeOutput( arrayMin( someArray ) );

Result: 0

Get smallest numeric value of an array

Uses the arrayMin function to get the smallest numeric value of an array

Run Example

someArray = [ 
	23,
	45,
	87,
	2,
	4
];
writeOutput( arrayMin( someArray ) );

Result: 2

Get smallest numeric value of an array using member function

Run Example

someArray = [ 
	23,
	45,
	99,
	1,
	4
];
writeOutput( someArray.Min() );

Result: 1

Additional Examples

aNames = array( 10412, 42, 33, 2, 999, 12769, 888 );
dump( arrayMin( aNames ) );
// member function
dump( aNames.min() );

Last updated

Was this helpful?