MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / last

Function last

lib/web/jshint.js:6622–6625  ·  view source on GitHub ↗

* 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

(array)

Source from the content-addressed store, hash-verified

6620 * // => 3
6621 */
6622 function last(array) {
6623 var length = array ? array.length : 0;
6624 return length ? array[length - 1] : undefined;
6625 }
6626
6627 /**
6628 * This method is like `_.indexOf` except that it iterates over elements of

Callers 5

baseMatchesPropertyFunction · 0.70
invokePathFunction · 0.70
hasFunction · 0.70
resultFunction · 0.70
runInContextFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected