What Is an Array Type in Typescript
Too Long; Didn't Read
Arrays work the same in TypeScript as they do in Javascript, the only difference is that we have to define their type upfront. Defining an array's type can be confusing at first, so let's look at how it works. Arrays, by their nature, are an ordered list of data. For example, an array of numbers could be defined like this: number[] = [ 1, 2, 3, 4] Arrays can be defined using the same format as before.