Description
Specifies an integer value one higher than the highest element index defined in an array.
Syntax
Array.length
Remarks
The elements in an array do not have to be contiguous and the length property may not be the number of elements in the array. For example:
var demo = new Array( ); demo[0] = 1; demo[99999] = 2; trace(demo.length); //output not 2 but 100000.
If a value smaller than its previous value is assigned to the length property, the array is truncated, and any elements with array indexes equal to or greater than the new value of the length property are lost. If a value larger than its previous value is assigned to the length property, the array is expanded, and any new elements created have the value undefined.