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