Arrays.last()

Look up the last item in an array.

Usage

Hover over inputs/exits for more info.

var Arrays = require('machinepack-arrays');


// Look up the last item in an array.

Arrays.last({

array: [ '*' ],

}).execSync();

Inputs

array required

The array containing the desired item.

[ '*' ]

Exits

error

An unexpected error occurred.

notFound

The array is empty, so it doesn't have any items.

success

OK.

(varies based on provided inputs)