const arr: string[] = ['a', 'b', 'c'];
V1
const last = arr.at(-1);
console.log(last); // -> "c"
V2
const last = arr[arr.length - 1];
console.log(last); // -> "c"
V3
If you don't need the array afterwards, you could use
const last = arr.pop()
console.log(last); // > "c"
V4
const last = arr.slice(-1)[0]
console.log(last); // -> "c"