---
title: "subscript(_:)"
framework: swift
role: symbol
role_heading: Instance Subscript
path: "swift/span/subscript(_:)-3r1qm"
---

# subscript(_:)

Accesses the element at the specified position in the Span.

## Declaration

```swift
subscript(position: Span<Element>.Index) -> Element { get }
```

## Parameters

- `position`: The offset of the element to access. position must be greater or equal to zero, and less than count.

## Overview

Overview note: O(1)
