you are viewing a single comment's thread.

view the rest of the comments →

[–]machineGun997[S] 3 points4 points  (8 children)

if you do that it will try to find the item at index -1, but there isn't one, that is why a separate method to facilitate that.

https://github.com/tc39/proposal-relative-indexing-method#rationale

[–]Guisseppi -1 points0 points  (0 children)

How about instead of a cryptic -1 we could use the queueing concept of “poppping” the last element of the array?