Each array element is stored in the order it's assigned, which is referred to as its index. Arrays are zero-indexed, meaning that the element order starts at zero instead of one. Think of an element's index as its reference, or location. In topPlayerScores, the first integer, 452, is located at index 0, 713 at index 1, and 984 at index 2:
Individual values are located by their index using the subscript operator, which is a pair of square brackets that contains the index of the elements. For example, to retrieve and store the second array element in topPlayerScores, we would use the array name followed by subscript brackets and index 1:
// The value of score is set to 713
int score = topPlayerScores[1];
The subscript operator can also be used to directly modify an array value just like any other variable, or even passed around as an expression by itself:
topPlayerScores[1] = 1001;
Debug.Log(topPlayerScores[1]);
The values in topPlayerScores are...