Arrays vs Tuples in TypeScript
TypeScript offers JavaScript developers a robust solution to writing bug-minimal code. It offers more types and stronger type checking than JavaScript. We'd explore tuples and arrays in TypeScript.
Typically, a tuple is an array with fixed size and k...
vicradon.hashnode.dev
Tuple : A tuple is a grouping of unnamed, ordered values. Each value in a tuple does not need to be the same type.
const tuplename : [string, number] = [ "ABC", 12 ]Array : An array is mutable collection. They are very efficient to create, but must always be a single type.
const arrayname: [string] = ["A", "B", "C"]For more information,refer the following link :
javatpoint.com/typescript-tuples