Created
August 17, 2012 23:05
-
-
Save tobie/3383354 to your computer and use it in GitHub Desktop.
Implementing Function.prototype.call in terms of Function.prototype.apply
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.prototype.call = function(obj) { | |
return this.apply(obj, Array.protoype.slice.apply(arguments, [1])); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment