Skip to content
wolfram77 edited this page Apr 1, 2020 · 25 revisions

Removes last value.

Similar: push, pop, shift, unshift.

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

var x = [1, 2, 3];
iterable.pop(x);
// [3, Iterable [1, 2]]

var x = [1, 2, 3, 4];
iterable.pop(x);
// [4, Iterable [1, 2, 3]]

references

Clone this wiki locally