Skip to content
wolfram77 edited this page Mar 25, 2020 · 21 revisions

Adds values to the end.

Alternatives: [default], [update].

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

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

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

references

Clone this wiki locally