Skip to content

Infinite Images:
The Art of Algorithms

Array

In object-oriented programming, a fundamental data structure that contains elements of the same type. Each element can be accessed using an index, which corresponds to its place within the array order. Indices start with 0 and ascend numerically. For example, the array areaCodes = [216, 419, 614] holds the area codes, in order, for Cleveland (index 0), Toledo (index 1), and Columbus (index 2), and these values are all integers. To return Toledo’s area code of 419, a programmer would run a command similar to: print(areaCodes[1]).