I am currently looking for a software/web development job preferably as a Rails-based developer.
Please email me at firstname.lastname@example.org. Thanks in advance for any leads!
Posted by Weston Ganger
var myArray = [1,2,3,4,5,6]; // Fastest method, requires the array is in a variable myArray[myArray.length - 1]; // Also very fast but it will remove the element from the array also, this may or may not matter in your case. myArray.pop(); // Slowest but very readable and doesn't require a variable myArray.slice(-1)
Related External Links: