Module

x/lodash_es/src/array.js>nth

lodash for deno use
Latest
function nth
import { nth } from "https://dotland.deno.dev/x/lodash_es@v0.0.2/src/array.js";

Gets the element at index n of array. If n is negative, the nth element from the end is returned.

Examples

var array = ['a', 'b', 'c', 'd'];

_.nth(array, 1); // => 'b'

_.nth(array, -2); // => 'c';

Parameters

array

The array to query.

n