Last active
October 9, 2019 21:55
-
-
Save wentout/47b5c53fb8a02b6b57f37c82dac8491c to your computer and use it in GitHub Desktop.
Flower
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 Pollen = { season : 'Spring' }; | |
// factory of constructors | |
var FlowersFactory = function (proto) { | |
var FlowerEggCell = function (sort) { | |
this.sort = sort; | |
}; | |
FlowerEggCell.prototype = proto; | |
return FlowerEggCell; | |
}; | |
var FlowerZygote = FlowersFactory(Pollen); | |
var galanthus = new FlowerZygote('Galanthus'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment