Returns the last element of an array.
The array to query.
The last element of the array, or undefined if the array is empty.
undefined
last([1, 2, 3]);// → 3last([]);// → undefined Copy
last([1, 2, 3]);// → 3last([]);// → undefined
1.0.0
Returns the last element of an array.