Skip to content

Instantly share code, notes, and snippets.

@abrjagad
Created April 27, 2014 13:17
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 abrjagad/11345365 to your computer and use it in GitHub Desktop.
Save abrjagad/11345365 to your computer and use it in GitHub Desktop.
example for call and apply
var log_this_and_message = function (message) {
console.log(message+this.name);
};
var thing = {
name: 'Big Hairy Thing'
};
log_this_and_message.call(thing, 'Hello!');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment