Sha256: de85d76b689d59b2b24952dcab7a2c2ecee5b5087306be6e056c29d2925de18e
Contents?: true
Size: 377 Bytes
Versions: 167
Compression:
Stored size: 377 Bytes
Contents
/** * Gets the last element of `array`. * * @static * @memberOf _ * @category Array * @param {Array} array The array to query. * @returns {*} Returns the last element of `array`. * @example * * _.last([1, 2, 3]); * // => 3 */ function last(array) { var length = array ? array.length : 0; return length ? array[length - 1] : undefined; } module.exports = last;
Version data entries
167 entries across 87 versions & 9 rubygems