The string value to retrieve a character from.
The zero-based index of the character to return. Negative values count from the
end: -1 is the last character, -2 is the second-to-last, and so on.
A single-character string at the normalised index, or undefined if out of range.
Polyfill implementation of
String.prototype.at()that returns the character at the given integer index, supporting negative indices which count back from the end of the string.Delegates index normalisation and bounds checking to polyArrAt by treating the string as an array-like object, matching native
String.prototype.at()behaviour exactly.