edit#1283
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
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
| } | ||
|
|
||
| addRowBtn.addEventListener('click', (e) => { | ||
| const rows = document.querySelectorAll('tr'); |
There was a problem hiding this comment.
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.
https://MarianaKlochnyk.github.io/js_growth_table_DOM/