DEV Community 👩‍💻👨‍💻

Discussion on: The Three Little Creational Patterns - A Design Patterns Intro

stylecramper profile image
Matt Anderson

Hi, I have a question about the Prototype example. In this code:


You're calling StickHousePrototype's copy method, which returns a StickHouse instance, then calling the StickHouse instance's addMailbox method - am I right? I'm not sure the complete example makes sense.

maxwell_dev profile image
Max Antonucci Author

Yeah, looking back on this now I may have aiming a bit too complicated for this example. Part of my edit will likely simplify this.