Function maxIndex

  • Return the index of the maximum value in the array using natural order.

    Parameters

    • iterable: Iterable<unknown>

    Returns number

  • Return the index of the maximum value in the array using natural order and a projection function to map values.

    Type Parameters

    • TDatum

    Parameters

    • iterable: Iterable<TDatum>
    • accessor: ((datum, index, array) => unknown)
        • (datum, index, array): unknown
        • Parameters

          • datum: TDatum
          • index: number
          • array: Iterable<TDatum>

          Returns unknown

    Returns number