The Array.prototype.at proposal (stage 3) adds a method for relative indexing (MDN):
const myArray = [1, 2, 3] console.log(myArray.at(-1)) // => 3
Another TC39 proposal, the Array.prototype.lastItem proposal (stage 1), adds a getter that returns the last item in an array:
const myArray = [1, 2, 3] console.log(myArray.lastItem) // => 3
The .at proposal is currently only implemented in pre-release versions of Firefox and Safari.
.lastItem is not supported in any browser, and the proposal’s champion currently considers withdrawing the proposal.