Skip to content
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]]

references

Clone this wiki locally