---
title: startIndex
framework: swift
role: symbol
role_heading: Instance Property
path: swift/arrayslice/startindex
---

# startIndex

The position of the first element in a nonempty array.

## Declaration

```swift
var startIndex: Int { get }
```

## Discussion

Discussion ArraySlice instances are not always indexed from zero. Use startIndex and endIndex as the bounds for any element access, instead of 0 and count. If the array is empty, startIndex is equal to endIndex.
