Skip to content
wolfram77 edited this page Mar 27, 2020 · 20 revisions

Adds values to the end.

Alternatives: default, update.
Similar: push, pop, shift, unshift.

array.push(x, ...vs);
// x:  an array
// vs: values to add
// --> array
const array = require('extra-array');

var x = [1, 2];
array.push(x, 3);
// [1, 2, 3]

array.push(x, 3, 4);
// [1, 2, 3, 4]

references

Clone this wiki locally