Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@joewalker
Created November 26, 2015 18:19
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 joewalker/96f1100b1e1f2ed0cc78 to your computer and use it in GitHub Desktop.
Save joewalker/96f1100b1e1f2ed0cc78 to your computer and use it in GitHub Desktop.
function decorate(func) {
return func();
}
function Foo(name) {
this.name = name;
}
Foo.prototype = {
blah: decorate(function() {
console.log(this.name);
}),
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment