Typescript : Arrays
How do you add an element to an array?
const companies: string[] = ["Apple", "Amazon", "Meta", "Google"];
Let's say we want to add "Microsoft" to the above array. We can use the push() method which adds a new item to the end of the array.
companies....
pradkum.hashnode.dev2 min read