In Python, you can do that:
arr = [1,2,3] arr[-1] // evaluates to 3
But in JS, you can\'t:
let arr = [1,2,3]; arr[-1]; // e
You miss the point, that arrays are objects (exotic object) and -1 is a valid key.
-1
var array = [1, 2, 3]; array[-1] = 42; console.log(array); console.log(array[-1]);