Understanding the Difference Between 'Indexes' and 'Indices'

In Brief
Both "indexes" and "indices" are correct plurals of "index", including when we discuss array positions. I prefer "indexes" in everyday development writing, but that is a style preference. Follow the terminology of the project or source you are working with; neither spelling changes what the code means.
Whilst the development community, especially in front‑end web development, is generally forgiving with terminological slip‑ups like the pronunciation of 'GIF' or the occasional synonym mix‑up, or whether what we do is 'frontend', or 'front‑end', or 'front end' development, there's one topic that's been on my mind: the difference between 'indexes' and 'indices'. It's not just a question of linguistic accuracy, but one of clarity and precision in coding and communication. So, what exactly is the difference between 'indexes' and 'indices', and more importantly, which one should we be using?
The Distinction Between 'Indexes' and 'Indices'
Both words are plurals of "index"; Collins lists both forms. In the array examples we deal with as developers, an index identifies an element's position. Calling several of those positions "indexes" or "indices" does not change their meaning.
I tend to write "indexes" because it sounds natural to me in an ordinary development discussion. That is a preference I can explain to a team, rather than a rule I can impose on JavaScript or on everyone who writes about it.
Origins and Contextual Use
Forgive me a bit of a history lesson here, I really have done much more reading about this particular topic than I should have done!
Etymology and Historical Usage
"Index" comes from Latin, with the sense of a pointer or something that indicates; the Collins etymology records that origin. It is an interesting bit of history, but it does not make either English plural more technically accurate when we discuss an array.
Use of These Words in Web Development
The documentation gives us a more useful answer than trying to infer a vocabulary rule from JavaScript's design: both forms appear in established technical sources.
Practical Examples in Web Development
The ECMAScript 2023 specification uses "array indices". MDN's Array reference has an "Array indices" heading and also uses "indexes" in its prose. There is no single spelling convention across those sources.
Practical Implications in Development
The older React Lists and Keys guide uses "indexes" when discussing keys. That is a real example of the wording I prefer, but it does not settle the language question for every React developer.
Rendering Lists in React
A really common task that we will all have come across in React is rendering lists of items. The useful engineering distinction is between an item's current array position and its stable identity; either plural can describe those positions.
Best Practices with 'Indexes'
Use stable identifiers from the data for React list keys where available. As the React guidance explains, position‑based keys can cause problems when items are reordered, including state becoming associated with the wrong item. That behaviour matters much more than which plural we use in the comment beside it.
Enhancing Code Readability and Maintenance
For a shared codebase, agree a spelling in the team's style guide and use it consistently in your own prose. Keep established API names and exact quotations as they are. If a colleague writes "indices", there is no technical error to correct simply because I would have written "indexes".
Wrapping Up
As I mentioned at the start, most people are unlikely to mind which plural you use. I'll generally choose "indexes", and I'm happy to follow "indices" where that is already the project's convention. The point is to help the next person understand the code, not to turn a valid spelling choice into another thing to argue about.