Skip to content

complete task#1540

Open
hardixxxxx wants to merge 2 commits into
mate-academy:masterfrom
hardixxxxx:develop
Open

complete task#1540
hardixxxxx wants to merge 2 commits into
mate-academy:masterfrom
hardixxxxx:develop

Conversation

@hardixxxxx
Copy link
Copy Markdown

Copy link
Copy Markdown

@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 required functionality! 🎉 Your code is well-structured and meets the task requirements. While the current approach works, keep in mind that changes to the DOM structure might affect the selection of elements. In future projects, consider ensuring that your script runs after the DOM is fully loaded or use event listeners for dynamic content. Keep up the good work! 😊

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

Comment thread src/scripts/main.js Outdated
Comment on lines +3 to +4
const list = document.querySelector('ul');
const employees = document.querySelectorAll('li');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The selection of ul and li elements using document.querySelector and document.querySelectorAll assumes that these elements are present in the DOM at the time this script runs. If the DOM structure changes or if these elements are dynamically added, this could lead to issues. Consider ensuring that the script runs after the DOM is fully loaded or use event listeners to handle dynamic content.

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.

2 participants