Array Constants

Enumeration of array operation constants that can be used in various array manipulation methods.

Values

Enum Value
Description

ARRAY_ENTIRE

Specifies that an operation should be performed on entire array

SORT_ASCENDING

Specifies ascending sort order (smallest to largest)

SORT_DESCENDING

Specifies descending sort order (largest to smallest)

Usage Example

// Finding maximum value in entire array
const maxIndex = this.api.FindArrayMaximum(
  prices,
  this.api.APIConstants.ARRAY_ENTIRE
);

// Sorting array in ascending order
this.api.SortArray(
  prices,
  this.api.APIConstants.ARRAY_ENTIRE,
  0,
  this.api.APIConstants.SORT_ASCENDING
);

// Sorting array in descending order
this.api.SortArray(
  prices,
  this.api.APIConstants.ARRAY_ENTIRE,
  0,
  this.api.APIConstants.SORT_DESCENDING
);

Last updated