We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Adds values to the start.
Alternatives: default, update. Similar: push, pop, shift, unshift.
array.unshift(x, ...vs); // x: an array // vs: values to add // --> unshifted
const array = require('extra-array'); array.unshift([3, 4], 2); // [ 2, 3, 4 ] array.unshift([3, 4], 1, 2); // [ 1, 2, 3, 4 ]
There was an error while loading. Please reload this page.