Deep Dive into TypeScript: Arrays, Unions, Tuples, Enums, and Interfaces
Arrays in TypeScript:
Arrays are used to store multiple values of the same type in a sequential order.
Example 1:
const names: string[] = [];
names.push("Dylan"); // No error
// names.push(3); // Error: Argument of type 'number' is not assignable to ...
abdulshaik.hashnode.dev3 min read