---
title: "subscript(_:)"
framework: swift
role: symbol
role_heading: Instance Subscript
path: "swift/collectionofone/subscript(_:)-876qi"
---

# subscript(_:)

Accesses the element at the specified position.

## Declaration

```swift
subscript(position: Int) -> Element { get set }
```

## Parameters

- `position`: The position of the element to access. The only valid position in a CollectionOfOne instance is 0.
