Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public print(): string {
- return `#Category: ${this.name}
- ${(this.products.length > 0
- ? this.products.map((p: Product) => p.print()).join('\n')
- : '#No product in this category')}`.replace(/^\s+/gm, '');
- }
Add Comment
Please, Sign In to add comment