---
title: "remove(at:)"
framework: Swift
role: symbol
role_heading: Instance Method
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+, watchOS 27.0+]
path: "swift/uniquearray/remove(at:)"
---

# remove(at:)

Removes and returns the element at the specified position.

## Declaration

```swift
@discardableResult mutating func remove(at index: Int) -> Element
```

## Return Value

Return Value The removed element.

## Discussion

Discussion All the elements following the specified position are moved to close the gap. note: O(self.count)
