Michael Theriot (2016-04-19T15:05:10.000Z)
michael.lee.theriot at gmail.com (2016-04-19T15:10:20.832Z)
> And Set by definition is an unordered collection, so there is no "last" > element. Sets in ES6 are iterated in insertion order. I don't think a .get or .set needs to be made for Array. Why would you use `arr.set(1, 4)` over `arr[1] = 4`, and why should there be more ways of doing the same thing? It would only ever be used for negative indices, and Reflect.get/Reflect.set already exists without that behavior. The original question was to use negative indices, which you can do with proxies. If a method should be added I think .last is the safest and would expect any implementation of it to have the same behavior. An `array[Symbol.last]` getter/setter would also be safe. You can even add it yourself without collision. ```js var last = Symbol(); Reflect.defineProperty(Array.prototype, last, { get: function () { return Reflect.get(this, this.length - 1); }, set: function (value) { return Reflect.set(this, this.length - 1, value); } }); var arr = [1,2,3]; arr[last] = 0; console.log(arr); // 1,2,0 ``` Maybe a .last (string) property getter/setter would also work here.