Skip to content
Subhajit Sahu edited this page Mar 14, 2020 · 21 revisions

Removes first value.

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