The first operation we’ll look at is reading, which is looking up what value is contained at a particular index inside the array.
Reading from an array actually takes just one step. This is because the computer has the ability to jump to any particular index in the array and peer inside. In our example of ["apples", "bananas", "cucumbers", "dates", "elderberries"], if we looked up index 2, the computer would jump right to index 2 and report that it contains the value "cucumbers".
How is the computer able to look up an array’s index in just one step? Let’s see how:
A computer’s memory can be viewed as a giant collection of cells. In the following diagram, you can see a grid of cells, in which some are empty, and some contain bits of data: ...