Negative indexes

C. Scott Ananian ecmascript at cscott.net
Mon Feb 1 19:46:40 UTC 2016


`arr.slice(-1)[0]` does what you want, I think.
 --scott
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160201/c1068a88/attachment.html>


More information about the es-discuss mailing list