An array is an ordered list of values. Think of it like a row of labeled lockers: each locker has a position number, and you can get or change values by position.
Key Ideas for Beginners
Arrays keep related data together in one place.
Order matters because each item has an index.
In Swift, indexes start at 0, not 1.
Basic Example
var colors = ["blue", "green", "red"]
print(colors[0]) // blue
print(colors[2]) // red
How to Read This
colors is the array name.
Each value has a position: 0, 1, 2.
colors[0] means “get the first item.”
Common Beginner Mistakes
Using an index that does not exist (for example colors[5]).
Forgetting indexes start at 0.
Mixing unrelated values in one array, which makes code harder to reason about.