Skip to content

edit#1283

Open
MarianaKlochnyk wants to merge 2 commits intomate-academy:masterfrom
MarianaKlochnyk:develop
Open

edit#1283
MarianaKlochnyk wants to merge 2 commits intomate-academy:masterfrom
MarianaKlochnyk:develop

Conversation

@MarianaKlochnyk
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.

Review Summary

Excellent work on this task! I am approving your solution as it successfully meets all the functional requirements. The logic for adding and removing rows and columns, as well as managing the button states, is implemented correctly and works as expected.

I have one minor suggestion to make your code even more robust. In src/scripts/main.js, it's a good practice to query for rows within the table element you've already selected (e.g., table.querySelectorAll('tr')) instead of the global document. This ensures your code will still work correctly if another table is ever added to the page.

This is just a tip for future reference. Overall, this is a very clean and solid implementation. Keep up the great work!


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

Footnotes

  1. Rate AI review example

Comment thread src/scripts/main.js Outdated
}

addRowBtn.addEventListener('click', (e) => {
const rows = document.querySelectorAll('tr');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

For consistency with other parts of your code, it's better to query for rows within the table element you've already selected (e.g., table.querySelectorAll('tr')). This makes your code more robust in case another table is added to the page in the future.

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