Returns the last element of an array.
A list of elements.
The last element, or undefined if the array is empty
undefined
lastElement([1, 2, 3]);// 3lastElement([]);// undefined Copy
lastElement([1, 2, 3]);// 3lastElement([]);// undefined
Returns the last element of an array.