Created
February 10, 2015 11:55
-
-
Save edankwan/eb6b0b76bfbf9a8159b4 to your computer and use it in GitHub Desktop.
Array.prototype.poop()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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