Proposal-index-from-end array[^n]

Cyril Auburtin cyril.auburtin at
Wed Aug 21 18:34:45 UTC 2019

There has been many "array.last()" and similar proposals on es-discuss

One has emerged:
It adds Array.prototype.lastIndex and Array.prototype.lastItem

I'd like to extend this idea with a syntax like `arr[^n]` (stands for
`arr[arr.length - n]`), I wrote it in

The idea comes from @rbuckton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list