MCPcopy
hub / github.com/lodash/lodash / nth

Function nth

lodash.js:7766–7768  ·  view source on GitHub ↗

* Gets the element at index `n` of `array`. If `n` is negative, the nth * element from the end is returned. * * @static * @memberOf _ * @since 4.11.0 * @category Array * @param {Array} array The array to query. * @param {number} [n=0] The index of the element

(array, n)

Source from the content-addressed store, hash-verified

7764 * // => 'c';
7765 */
7766 function nth(array, n) {
7767 return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
7768 }
7769
7770 /**
7771 * Removes all given values from `array` using

Callers

nothing calls this directly

Calls 2

baseNthFunction · 0.85
toIntegerFunction · 0.85

Tested by

no test coverage detected