Modifying a Tuple in TypeScript

The elements of a tuple can be modified by writing values ​​of the appropriate type into them. Let's look at an example. Let's say we have the following tuple:

typescriptlet user: [string, number] = ['john', 31];

Let's change its element:

typescriptuser[0] = 'eric';
console.log(user);

But an attempt to write a value of a different type into a tuple element will result in an error:

typescriptuser[0] = 12; // 
Задание 1

Tell me what the result of running the following code will be:

typescriptlet time: [number, number, number] = [12, 59, 59];
time[0] = 13;
console.log(time);
Задание 2

Tell me what the result of running the following code will be:

typescriptlet time: [number, number, number] = [12, 59, 59];
time[0] = '01';
console.log(time);