Stew.shift() - shysolocup/stews GitHub Wiki

removes the first entry
type: Function

alt names:

  • unpull()

arguments:

  • ?offset Number
    optional offset from the first index

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


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


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


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


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


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


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


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