Skip to content

Instantly share code, notes, and snippets.

@cers
Created March 7, 2010 23:30
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 cers/324723 to your computer and use it in GitHub Desktop.
Save cers/324723 to your computer and use it in GitHub Desktop.
function Post(){};
Post.prototype = {test : function test() console.log};
p = new Post();
p.test()("foobar"); // foobar
Post.prototype = {test : function test(a) {console.log(a)}};
p = new Post();
p.test("foobar"); // foobar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment