A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
stdle-14.ts
1constpair:[number,number]=[1,2];
2constarr=pairasnumber[];
3arr.push(3);
4console.log(pair.length,arr[2]);
Modern
Answer & explanation
Console output
3 3
Why
TypeScript tuples are a compile-time fiction over plain JavaScript arrays. There is no runtime length enforcement, so push adds a third element. Because pair and arr alias the same array, both length and the new element reflect the change.