-
Couldn't load subscription status.
- Fork 5
last
Subhajit Sahu edited this page Nov 20, 2022
·
20 revisions
Get last value.
function last(x, vd?)
// x: an array
// vd: default valueconst array = require('extra-array');
array.last([1, 2, 3]);
// → 3
array.last([], -1);
// → -1