Module

x/lodash_es/mod.ts>takeRight

lodash for deno use
Latest
function takeRight
import { takeRight } from "https://dotland.deno.dev/x/lodash_es@v0.0.2/mod.ts";

Creates a slice of array with n elements taken from the end.

Examples

_.takeRight([1, 2, 3]); // => [3]

_.takeRight([1, 2, 3], 2); // => [2, 3]

_.takeRight([1, 2, 3], 5); // => [1, 2, 3]

_.takeRight([1, 2, 3], 0); // => []

Parameters

array

The array to query.

n
guard