JS.5 Array Object Functions

JavaScript arrays are a non-fixed length arrays. A constant array can be created using an array literal:

states = ["NJ", "NY", "CA"];

This is equivalent to the array constructor:

states = new Array("NJ", "NY", "CA");

The length of the array is dynamically adjusted when new items are added to an array. If the newly added item leaves a gap in the existing array, the items in the gap have an 'undefined' value.

states[50] = 'FL';

The length property of an array object returns the current array length.

for(var i = 0; i < states.length; i++) {

  if(states[i] == 'NJ') {

  ...

  }

}

Array objects also have functions to merge, slice, reverse, etc.

<< datePart(interval, date) © 1996-2013 InetSoft Technology Corporation (v11.4) concat(array1, array2, …, arrayN) >>