<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/UniqueArray/append(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s11UniqueArrayVsRi_zrlE6appendyyxnF"
  },
  "title" : "append(_:)"
}
-->

# append(_:)

Adds an element to the end of the array.

```
mutating func append(_ item: consuming Element)
```

## Parameters

`item`

The element to append to the collection.

## Discussion

If the array does not have sufficient capacity to hold any more elements,
then this reallocates the array’s storage to grow its capacity, using a
geometric growth rate.

> Complexity: O(1) as amortized over many invocations on the same array.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)