Skip to content

Instantly share code, notes, and snippets.

@teramako
Created February 3, 2010 13:27
Show Gist options
  • Save teramako/293598 to your computer and use it in GitHub Desktop.
Save teramako/293598 to your computer and use it in GitHub Desktop.
function Hoge(){
if (this instanceof arguments.callee){
return this;
}
return new arguments.callee;
}
Hoge.prototype = {
foo: "foo",
bar: "bar"
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment