Changes

JavaScript Arrays

1 byte added, 14:19, 15 May 2007
Initializing the Element of an Array
'''Note:''' An array will grow automatically as new items are added so it is not necessary to specifiy at creation time the number of elements you believe the array will need. The decision as to whether to pre-allocate the initial size of the array is typically one of memory and speed. A mission critical application that needs to store a large amount of data in an array may not want the delay associated with waiting for the size of the array to be increased each time a new item is added. In this situation the array would be pre-initialized by specifying an initial size. This then has the trade-off that a large amount of memory may be taken up and not used right away. In practice it is usually acceptable to let array grow as items are added.
== Initializing the Element Elements of an Array ==