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