01 / 05
An array has a type for its contents
An array is a container that holds several values together. In TypeScript you also write down what goes inside it.
You write it by putting [] after the type of the contents. An array of strings is string[].
const fruit: string[] = ["apple", "orange"];console.log(fruit);Result
["apple", "orange"]