Last active
December 17, 2015 05:59
-
-
Save fakiolinho/5561869 to your computer and use it in GitHub Desktop.
JS: Custom Object for Multiple Instances
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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