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

# endIndex

The collection’s “past the end” position.

## Declaration

```swift
var endIndex: FlattenSequence<Base>.Index { get }
```

## Discussion

Discussion endIndex is not a valid argument to subscript, and is always reachable from startIndex by zero or more applications of index(after:).
