String.prototype.atbeginnerconst str = 'Hello'
str.at(0) // β 'H'
str.at(-1) // β 'o'
str.at(1) // β 'e'Use at() to access a character by index, supporting negative indices to count from the end.
str.at(-2) returns the second-to-last character.
Challenge: Implement secondToLast(str) using .at(-2).
secondToLast('hello') // β 'l'
secondToLast('abc') // β 'b'