Skip to content

Instantly share code, notes, and snippets.

@elsassph
Forked from edankwan/poop.js
Last active October 18, 2021 13:45
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save elsassph/0349110f73ff208f3f01 to your computer and use it in GitHub Desktop.
Save elsassph/0349110f73ff208f3f01 to your computer and use it in GitHub Desktop.
Array.prototype.poop = function() {
this.pop();
// return nothing, it's poop
}
Array.prototype.shit = function() {
this.shift();
// return nothing, it's poop
}
@elsassph
Copy link
Author

Sometimes you .pop() or .shift() but don't care about the result... Feel no remorse!

@DavisDevelopment
Copy link

I will never use the .pop() or the .shift() methods again, without thinking of this. Thank you

@elvonkh
Copy link

elvonkh commented Dec 10, 2020

From now, I will use this method to pop my array from my stomach

@PongoEngine
Copy link

So pooping and shitting removes from different sides of the log?
If so then that's pretty incredible.

@Muffle10
Copy link

Muffle10 commented Jun 2, 2021

Perfect code.

@FISHARMNIC
Copy link

Amazing 🙏 🙏 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment