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

Removes last value.

Alternatives: [default], [update].

array.pop(x);
// x: an array
// --> [value, array]
const array = require('extra-array');

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

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

references

Clone this wiki locally