Skip to content

Instantly share code, notes, and snippets.

@edankwan
Created February 10, 2015 11:55
Show Gist options
  • Save edankwan/eb6b0b76bfbf9a8159b4 to your computer and use it in GitHub Desktop.
Save edankwan/eb6b0b76bfbf9a8159b4 to your computer and use it in GitHub Desktop.
Array.prototype.poop()
(function(p, l){
var s = '';
function yolo(i) {
return function() {
return this.splice(this.length - i - 2);
};
}
for(var i = 0; i < l; i++) {
p['po' + (s += 'o') + 'p'] = yolo(i);
}
}(Array.prototype, 100));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment