Created
November 2, 2009 08:40
-
-
Save oberhamsi/224033 to your computer and use it in GitHub Desktop.
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
var Config = function(){}; | |
Config.prototype.a = 100; | |
Config.prototype.b = 200; | |
var Flags = function() {}; | |
Flags.prototype = new Config(); | |
Flags.constructor = Flags; | |
Flags.prototype.a = 3; | |
Flags.prototype.c = 5; | |
var options = new Flags(); | |
js> options.a | |
3 | |
js> options.b | |
200 | |
js> options.c | |
5 | |
js> options instanceof Flags | |
true | |
js> options instanceof Config | |
true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment