Select.takeRight()

Slice of array with n elements taken from the end

Usage

Hover over inputs/exits for more info.

var Select = require('machinepack-select');


// Slice of array with n elements taken from the end

Select.takeRight({

collection: [],

num: 2,

}).execSync();

Inputs

collection required

A collection

num required

A number of elements

2

Exits

error

An unexpected error occurred.

emptyError

Empty collection.

success

OK.

(varies based on provided inputs)