maxIndex()

Get the index of the (first) maximum value in an array.

This function is valid in v2.12.0. This function has been downloaded 2 times.

Parameter

{Array} array
Array which contains the maximum value that should be found and for which the corresponding index should be returned.

Returns

{number}
The index of the (first) maximum value within array. If array is empty -1 will be returned.

Required Function

This function requires the following function which is included automatically:

  • minIndex()
    Get the index of the (first) minimum value in an array.