Skip to content

Instantly share code, notes, and snippets.

@clarkeash
Created December 5, 2013 15:31
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 clarkeash/7807521 to your computer and use it in GitHub Desktop.
Save clarkeash/7807521 to your computer and use it in GitHub Desktop.
New to objects in JS, no idea of the differences here: (why would you use one over the other)
function Object(){
}
Object.prototype.func = function(){
//code
};
function Object(){
this.func = function(){
//code
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment