Skip to content

Instantly share code, notes, and snippets.

@fakiolinho
Last active December 17, 2015 05:59
Show Gist options
  • Save fakiolinho/5561869 to your computer and use it in GitHub Desktop.
Save fakiolinho/5561869 to your computer and use it in GitHub Desktop.
JS: Custom Object for Multiple Instances
//Create a custom object for multiple instances
function object(attribute1, attribute2) {
this.attribute1 = attribute1;
this.attribute2 = attribute2;
this.method1 = function() {
return this.attribute1 + ' ' + this.attribute2;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment