Negative indexes
Felipe Nascimento de Moura
felipenmoura at gmail.com
Tue Feb 2 00:43:44 UTC 2016
Yes, that would do what he wants...but I like the idea of using
```arr[-1]```, though!!
It just makes sense, to me!
Specially if you want to use reversed loops, for example.
On Mon, Feb 1, 2016 at 5:46 PM C. Scott Ananian <ecmascript at cscott.net>
wrote:
> `arr.slice(-1)[0]` does what you want, I think.
> --scott
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160202/0a08ab27/attachment-0001.html>
More information about the es-discuss
mailing list