Created
April 27, 2014 13:17
-
-
Save abrjagad/11345365 to your computer and use it in GitHub Desktop.
example for call and apply
This file contains hidden or 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
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