Overview of Array Methods

Note the following:

  • An array is a class of object that holds multiple values instead of one value. To reference a single value in an array, you use an array index number or string that is associated with this value.

  • An array element is the value of an array object. It can include any data type. Siebel CRM does not require that the elements in an array be the same type, and it does not limit the number of elements that an array can include.

  • The index number is a number or a string that identifies the array element. This number follows the array name and you place it in square brackets.

The following example statements store values in an array:

var array = new Array;
array[0] = "fish";
array[1] = "fowl";
array["joe"] = new Rectangle(3,4);
array[foo] = "creeping things"
array[goo + 1] = "and so on."

Array elements can be noncontiguous. For example, an array can include the following items:

  • An element at index 0

  • No element at index 1

  • An element at index 2

An array typically starts at index 0. It does not typically start at index 1.