hm...yep...you are right! On Mon, Feb 1, 2016 at 10:51 PM Logan Smyth <[email protected]> wrote:
> Felipe, this has been discussed in the other thread that was just linked: > https://esdiscuss.org/topic/javascript-language-feature-idea. `arr[-1]` > is not a workable solution because it could break existing code. > > On Mon, Feb 1, 2016 at 4:43 PM, Felipe Nascimento de Moura < > [email protected]> wrote: > >> 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 <[email protected]> >> wrote: >> >>> `arr.slice(-1)[0]` does what you want, I think. >>> --scott >>> >>> _______________________________________________ >>> es-discuss mailing list >>> [email protected] >>> https://mail.mozilla.org/listinfo/es-discuss >>> >> >> _______________________________________________ >> es-discuss mailing list >> [email protected] >> https://mail.mozilla.org/listinfo/es-discuss >> >> >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

