Last active
June 14, 2017 07:50
-
-
Save Cfeusier/601b17d046f3ea3d5b82 to your computer and use it in GitHub Desktop.
Example of the Pseudo-Classical 'Class' Pattern in JavaScript
This file contains hidden or 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
| var Example = function() { | |
| this.extraProp1 = "Example Property Value"; | |
| }; | |
| Example.prototype.exampleGet = function() { | |
| return this.extraProp1; | |
| }; | |
| Example.prototype.exampleSet = function(value) { | |
| this.extraProp1 = value; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment