Tuples describe arrays with a fixed order and known element types.

Tuples

tuple.ts
const attempts: number = ;
const result: [string, number] = ["login", attempts];

const action: string = result[0];
const count: number = result[1];

console.log(`${action}: ${count}`);
const attempts: number = ;
const result: [string, number] = ["login", attempts];

const action: string = result[0];
const count: number = result[1];

console.log(`${action}: ${count}`);
const attempts: number = ;
const result: [string, number] = ["login", attempts];

const action: string = result[0];
const count: number = result[1];

console.log(`${action}: ${count}`);
tuple A tuple such as `[string, number]` stores values in fixed positions with fixed types.