We cam make this simpler, in Javascript Array.slice() already accept
negative index.
Developers from Javascript and other languages are familiar with
negative value for index parameter.
So why cant we make array accept negative index.

in comparison with Bob Myers' proposal

> ```
> [1,2,3](-1)
> ```

will become

```
 [1,2,3][-1]
```

This will also allow us to set value using negative index,
example

var array_data = [1, 2, 3, 4];
array_data[-1] = 5;
array_data[-3] = 6;

// now array_data is [1, 6, 3, 5]
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to