---
title: "subscript(_:)"
framework: Swift
role: symbol
role_heading: Instance Subscript
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/subscript(_:)"
---

# subscript(_:)

Accesses the element at the specified position.

## Declaration

```swift
subscript(position: Int) -> Element { borrow mutate }
```

## Parameters

- `position`: The position of the element to access. The position must be a valid index of the array that is not equal to the endIndex property.

## Overview

Overview note: O(1)
