Introduction
We use array type annotations to tell TypeScript what kind of items an array holds. This helps catch mistakes early and makes code easier to understand.
When you want to store a list of numbers and ensure only numbers go in the array.
When you have a list of strings like names or colors and want to prevent other types from being added.
When you want to declare an empty array but specify what type of items it will hold later.
When you want to create a function that accepts an array of a specific type as input.
When you want to return an array of a certain type from a function.