Bookshelf Home | Contents | Index | PDF |
Siebel eScript Language Reference > Siebel eScript Commands > Array Objects > Array length PropertyThe length property returns a number representing the largest index of an array, plus 1. SyntaxReturnsThe number of the largest index of the array, plus 1. NOTE: This value does not necessarily represent the actual number of elements in an array, because elements do not have to be contiguous. UsageFor example, suppose you had two arrays, var ant = new Array; var bee = new Array; The length property of both ant and bee is equal to 4, even though ant has twice as many actual elements as bee does. By changing the value of the length property, you can remove array elements. For example, if you change ant.length to 2, ant loses elements after the first two, and the values stored at the other indices are lost. If you set bee.length to 2, then bee consists of two members: bee[0], with a value of 88, and bee[1], with an undefined value. |
Siebel eScript Language Reference |