If I understand this correctly it is to add negative index support to arrays. How will findIndex work when this is introduced? It currently uses -1 as a return value when no element satisfies the testing function.
So [0, 1, 2, 3].at(-2) === 2
I don't like that very much.
Mind you, I don't like the idea of using [0,1,2,3].at(-0) either...
Or, if it’s more intuitive, you can think of the array index as an unsigned integer where the max is equal to the length of the array. If you try to assign -1 to a uint8, the result will be 255 — the highest possible value (the last index).
[1, 2, 3, 4].at(0) === 1
[1, 2, 3, 4].at(1) === 2
[1, 2, 3, 4].at(-1) === 4
findIndex’s behavior is unchanged.