Returns the last element of an array.
This function takes an array and returns the last element of the array.
If the array is empty, the function returns undefined
.
Unlike some implementations, this function is optimized for performance by directly accessing the last index of the array.
The last element of the array, or undefined
if the array is empty.
Returns the last element of an array.
This function takes an array and returns the last element of the array.
If the array is empty, the function returns undefined
.
Unlike some implementations, this function is optimized for performance by directly accessing the last index of the array.
The array from which to get the last element.
The last element of the array, or undefined
if the array is empty.
Alias