The collection.length property returns the number of elements in the collection.
The collection.length property is initialized when the collection is created. Adding or removing elements updates the length, if necessary. This property is read-only (you cannot use it to set the size of the collection).