# Array Index

*noun*

say it: **“uh-RAY IN-deks”** **/əˈreɪ ˈɪndɛks/**

The number that says where an item sits in a JavaScript array. Counting starts at 0, so the first item is at index 0 and the second at index 1.

## What is **Array Index** in JavaScript?

**Array Index** — A zero-based number that identifies an element's position in an array.

```javascript
const stops = ["Oak", "Pine", "Lake"];
const secondStop = stops[1];
const stopCount = stops.length;
```

## In a sentence

- “I asked for the song at **index** 9 of a four-song playlist and got undefined back.”
- “The first song on the playlist is at **index** 0, so playlist\[0\] gives me Highway Sunrise.”

Level: Apprentice · [More JavaScript terms at this level](https://www.ask-codey.com/glossary?category=javascript&level=2)

Updated: November 9, 2026

## In other subjects

- [Array Index in C#](https://www.ask-codey.com/glossary/array-index-c-sharp)
- [Array Index in Java](https://www.ask-codey.com/glossary/array-index)
- [Array Index in PowerShell](https://www.ask-codey.com/glossary/array-index-powershell)
- [Array Index in Unix](https://www.ask-codey.com/glossary/array-index-unix)

Source: https://www.ask-codey.com/glossary/array-index-javascript
