Created
October 6, 2011 14:49
-
-
Save Raynos/1267586 to your computer and use it in GitHub Desktop.
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 Constructor = function _constructor(prop, arg) { | |
this.property = prop; | |
this.public = arg + "dynamic"; | |
} | |
Constructor.prototype.method = function () { | |
... | |
} | |
var obj = new Constructor(42, "value of public"); |
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 Proto = pd.create({ | |
constructor: function _constructor(props, arg) { | |
this.public = arg + "dynamic"; | |
}, | |
method = function() { | |
... | |
} | |
}); | |
var obj = Proto({ | |
property: 42, | |
}, "value of public"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment