Typescript Array Methods
TypeScript supports arrays, similar to JavaScript. There are two ways to declare an array:
1. Using square brackets. This method is similar to how you would declare arrays in JavaScript.
let fruits: string[] = [‘Apple’, ‘Orange’, ‘Banana’];
2. Using a generic array type, Array<elementType>.
let fruits: Array<string> = [‘Apple’, ‘Orange’, ‘Banana’];
In this article, I’m going to discuss more array methods that are available. Below are some available array methods and their uses.