Complete the code to declare a tuple with a fixed length of 2 and types string and number.
let user: [string, [1]];string for both elements instead of number for the second.any which is too general.The tuple user has two elements: the first is a string, and the second is a number.
Complete the code to assign values to the tuple with fixed types string and number.
user = [[1], 25];
The first element of the tuple must be a string, so 'Alice' is correct.
Fix the error in the tuple declaration to ensure fixed length and types string and boolean.
let flags: [string, [1]];string or number instead of boolean.any which is too general.The tuple flags expects the second element to be a boolean type.
Fill both blanks to declare a tuple with fixed length 3 and types number, string, boolean.
let data: [[1], [2], boolean];
any instead of specific types.The tuple data has three elements: number, string, and boolean in order.
Fill all three blanks to create a tuple with fixed length and types: string, number, boolean.
const info: [[1], [2], [3]] = ['John', 30, true];
any instead of specific types.The tuple info has three elements: string, number, and boolean in that order.