Stew.pop() - shysolocup/stews GitHub Wiki

removes the last entry
type: Function

alt names:

  • unpush()

arguments:

  • ?offset Number
    optional offset from the last index

list: pair:
const { Stew } = require('stews');


let arr = new Stew([ "a", "b", "d", "c", "e" ]);


arr.pop(); // removes "e"
arr.pop(1); // removes "d"


console.log(arr);
const { Stew } = require('stews');


let obj = new Stew({ a: 1, b: 2, d: 4, c: 3, e: 5 });


obj.pop(); // removes e
obj.pop(1); // removes d


console.log(obj);
Stew(3) [ "a", "b", "c" ]
Stew(3) { a: 1, b: 2, c: 3 }


⚠️ **GitHub.com Fallback** ⚠️