Skip to content

Instantly share code, notes, and snippets.

@debugmodedotnet
Created December 29, 2017 09:15
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 debugmodedotnet/3c65638b9645487f5f9a480e55f23a7c to your computer and use it in GitHub Desktop.
Save debugmodedotnet/3c65638b9645487f5f9a480e55f23a7c to your computer and use it in GitHub Desktop.
function message(age) {
return `Hi ${this.name}, you are ${age} years old !`;
}
var person = {
name: 'dj'
};
var mes = message.apply(person, [30, 67]);
console.log(mes); // Hi dj, you are 30 years old !
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment