Changes

JavaScript Arrays

138 bytes added, 14:33, 15 May 2007
Accessing the Elements of a JavaScript Array
Often, however, it is necessary to access each element in an array. While writing code to access each item one by one is accepbtable for an array with one a few items this becomes difficult for larger arrays. Fortunately thre are a couple of ways to ''loop'' through all the items in the array.
One way is to create a ''for loop'' (see[[JavaScript Flow Control and Looping]]) combined with the ''length'' property which contains the number of items in the specified array.