---
title: endIndex
framework: swift
role: symbol
role_heading: Instance Property
path: swift/set/endindex
---

# endIndex

The “past the end” position for the set—that is, the position one greater than the last valid subscript argument.

## Declaration

```swift
var endIndex: Set<Element>.Index { get }
```

## Discussion

Discussion If the set is empty, endIndex is equal to startIndex.
