Skip to content

Instantly share code, notes, and snippets.

@snowmantw
Last active February 16, 2016 08:33
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 snowmantw/926968d84e4336c22859 to your computer and use it in GitHub Desktop.
Save snowmantw/926968d84e4336c22859 to your computer and use it in GitHub Desktop.
let Foo = function() {
this._name = 'Foo';
};
Foo.prototype.bark = function() {
console.log(this._name, ' barks');
};
let foo = new Foo();
let fooBark = foo.bark;
fooBark();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment