-
Notifications
You must be signed in to change notification settings - Fork 5
last
Subhajit Sahu edited this page May 3, 2023
·
20 revisions
Get last value.
function last(x, vd?)
// x: an array
// vd: default value
const xarray = require('extra-array');
xarray.last([1, 2, 3]);
// → 3
xarray.last([], -1);
// → -1