| length The length property is a count of the number of entries within an array. If a constructor function is used when the array was created, the length property will reflect that amount, even if there has been no data placed within some or even all of the array entries. syntax: arrayName(numberSize) EXAMPLE var arrayOne = new Array(3); arrayOne[0] = "red"; arrayOne[1] = "white"; arrayOne[2] = "blue"; The example shows the creation of an array that has a length constructor of 3 specified. The amount of entries within the array, then, is three. To have the length of the array returned, examine the following, keeping in mind the above example. document.write(arrayOne.length); This snippet will return the length of the above array, arrayOne, which is 3. |