Skip to content

Commit 68c8db1

Browse files
committed
fix solution
1 parent 85ff860 commit 68c8db1

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

src/herbivoresAndCarnivores.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ class Carnivore extends Animal {
3131
animal.health = animal.health - 50;
3232

3333
if (animal.health <= 0) {
34-
const index = Animal.alive.indexOf(animal);
35-
36-
Animal.alive.splice(index, 1);
37-
3834
Animal.alive = Animal.alive.filter((currentAnimal) => {
3935
return currentAnimal !== animal;
4036
});

0 commit comments

Comments
 (0)