(id: number)
| 34 | } |
| 35 | |
| 36 | deleteCat(id: number): boolean { |
| 37 | const index = this.cats.findIndex((cat) => cat.id === id); |
| 38 | if (index === -1) { |
| 39 | return false; |
| 40 | } |
| 41 | this.cats = this.cats.filter((cat, catIndex) => catIndex !== index); |
| 42 | return true; |
| 43 | } |
| 44 | } |
no outgoing calls
no test coverage detected