-
Notifications
You must be signed in to change notification settings - Fork 5
shift
wolfram77 edited this page Mar 25, 2020
·
21 revisions
Removes first value.
Alternatives: [default], [update].
array.shift(x);
// x: an array
// --> [value, array]
const array = require('extra-array');
array.shift([1, 2, 3]);
// [1, [2, 3]]
array.shift([1, 2, 3, 4]);
// [1, [2, 3, 4]]