Adds an element to the end of the collection.
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Xcode 10.2+
The element to append to the collection.
If the collection does not have sufficient capacity for another element, additional storage is allocated before appending
new. The following example adds a new number to an array of integers:
Complexity: O(1) on average, over many calls to
append(_:) on the same collection.