string[] or Array<string> describe homogeneous arrays. Tuples fix length and per-index types: [string, number] for ['EUR', 42].
Readonly tuples
Use readonly when a fixed pair must not be mutated.
When to use tuples
Reach for tuples when position matters: RGB triples, database rows, React hook return pairs [value, setValue]. For homogeneous lists of unknown length, use arrays.
Common pitfalls
- Accessing
pair[5]on a two-item tuple is a compile error—good. - Spreading a tuple into a wider array is fine; the reverse needs explicit typing.
Self-check
- Type a
[string, number, boolean]for a product id, price, and in-stock flag.
Practice: Apply arrays-tuples in the playground, then explain arrays tuples in one sentence without looking at notes.