Skip to main content

Timeline for answer to Get the last item in an array by user1144616

Current License: CC BY-SA 3.0

Post Revisions

8 events
when toggle format what by license comment
Sep 25, 2019 at 5:38 review Suggested edits
Sep 25, 2019 at 7:41
Feb 14, 2018 at 17:45 history edited illright CC BY-SA 3.0
Fixes misleading link
Jul 20, 2013 at 0:29 comment added kritzikratzi this modifies the array. you could use slice(-1) instead of splice(-1) to leave the original array untouched. @AramKocharyan no its not, compare ["hi"] vs "hi".
Dec 29, 2012 at 15:34 comment added Aram Kocharyan @tozazaburo isn't that the same thing?
Dec 29, 2012 at 7:02 comment added user663031 Doesn't this return the last element in an array, instead of the last element itself?
S Aug 29, 2012 at 18:07 history suggested seriousdev CC BY-SA 3.0
link to proper doc
Aug 29, 2012 at 17:59 review Suggested edits
S Aug 29, 2012 at 18:07
Mar 16, 2012 at 0:53 history answered user1144616 CC BY-SA 3.0