Skip to content

Instantly share code, notes, and snippets.

@tobie
Created August 17, 2012 23:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tobie/3383354 to your computer and use it in GitHub Desktop.
Save tobie/3383354 to your computer and use it in GitHub Desktop.
Implementing Function.prototype.call in terms of Function.prototype.apply
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