> For the complete documentation index, see [llms.txt](https://gold.gitbook.io/kotlin/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gold.gitbook.io/kotlin/collections/elements-operations/elementat.md).

# elementAt

n 번째의 인덱스의 값을 반환한다

```kotlin
public inline fun <T> List<T>.elementAt(index: Int): T {
    return get(index)
}

val list = listOf(1, 2, 3, 4, 5)
println(list.elementAt(2))  // 3
println(list.elementAt(7))  // Error
```
