Glossary: Software Design Patterns in JavaScript
Composite
A pattern where a single item and a group answer the same method, so groups can contain other groups. A Bundle's price() asks each part, whether Item or Bundle, and adds the answers.
Glossary: Software Design Patterns in JavaScript
A pattern where a single item and a group answer the same method, so groups can contain other groups. A Bundle's price() asks each part, whether Item or Bundle, and adds the answers.