FindArrayMaximum

Description

The FindArrayMaximum method finds the index of the maximum value in a numeric array within a specified range.

Syntax

public FindArrayMaximum(
    array: number[],
    count: number = APIConstants.ARRAY_ENTIRE,
    start = 0
    ): number

Parameters

  • array: An array of numbers to search in

  • count: Optional. The number of elements to search through. Default is ARRAY_ENTIRE

  • start: Optional. The starting index for the search. Default is 0

Return Value

Returns a number representing the index of the maximum value in the specified range. Returns -1 if the range is invalid.

Example

Last updated