2 * Gets the last element of `array`.
8 * @param {Array} array The array to query.
9 * @returns {*} Returns the last element of `array`.
15 function last(array) {
16 var length = array == null ? 0 : array.length;
17 return length ? array[length - 1] : undefined;
20 module.exports = last;