Better Pop is a better way to pop elements from arrays in Javascript.
Use the package manager npm to install better-pop.
npm install better-pop
const betterPop = require('better-pop');
let arr = ["there", "are", "elements"];
arr = betterPop(arr);
console.log(arr); // ["there", "are"]
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.