nikolayneykov

Untitled

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