---
title: startIndex
framework: realitykit
role: symbol
role_heading: Instance Property
path: realitykit/scene/anchorcollection/startindex
---

# startIndex

The position of the first element in a nonempty collection.

## Declaration

```swift
@MainActor @preconcurrency var startIndex: Int { get }
```

## Discussion

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

## See Also

### Manipulating indices

- [Scene.AnchorCollection.Index](realitykit/scene/anchorcollection/index.md)
- [endIndex](realitykit/scene/anchorcollection/endindex.md)
- [index(after:)](realitykit/scene/anchorcollection/index(after:).md)
