# String Index

*noun*

say it: **“STRING IN-deks”** **/strɪŋ ˈɪndɛks/**

The number that says where a character sits in a JavaScript string, counting from 0, so in 'Mochi' the M is at index 0 and the i is at index 4.

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

**String Index** — A zero-based position used to locate a character in a String.

```javascript
const city = "Denver";
const characterCount = city.length;
const firstCharacter = city[0];
```

## In a sentence

- “name\[0\] read the character at **index** 0, the first letter, so I could show it in a round badge.”

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

- [String Index in C#](https://www.ask-codey.com/glossary/string-index-c-sharp)
- [String Index in Java](https://www.ask-codey.com/glossary/string-index)

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