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

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