Foundations: index, order and length
Arrays start at index 0, and that rule affects everything else.
The first element of an array is at `arr[0]`, and the `length` property tells you how many elements exist, not what the last index is.
If you access an out-of-range index, you get `undefined`, so it is worth validating boundaries when you loop or inspect specific positions.
- The first index is `0`.
- The last valid index is `length - 1`.
- `length` does not return the last index.
- An invalid index produces `undefined`.