Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #3335

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from
Open

Develop #3335

wants to merge 17 commits into from

Conversation

Vitalii120296
Copy link

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


Great job on implementing the task requirements! 🎉 Your code is well-structured and effectively meets the core functionality needed. The use of splice is a minor issue and doesn't impact the overall functionality, but switching to filter would be a nice optimization for future improvements. Keep up the good work and happy coding! 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

Comment on lines +29 to +32
if (target.health <= 0) {
const index = Animal.alive.findIndex((animal) => animal === target);

Animal.alive.splice(index, 1);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using splice to remove the animal from Animal.alive, consider using the filter method to create a new array excluding animals with health less than or equal to 0. This approach is more efficient and aligns with the task checklist preference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants