Gets last element of an array.
last([1, 2]) // 2 Copy
last([1, 2]) // 2
last([1]) // 1 Copy
last([1]) // 1
last([]) // undefined Copy
last([]) // undefined
source array
Gets last element of an array.
Example
Example
Example