Index

An index is the position number used to access a specific item in an array, list, or string. In most languages indexing starts at 0, so the first item is index 0.

General Programming

Examples

Python

letters = ["a", "b", "c"]
print(letters[1])

Output:

b

JavaScript

const letters = ["a", "b", "c"];
console.log(letters[0]);

Output:

a

See also

Back to the Dictionary