added solution#1281
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great work on this task! Your solution correctly implements all the required functionality for the growth table, including adding/removing rows and columns and properly disabling the buttons at the boundaries. I am approving your submission because it successfully meets all the project requirements.
I have one small suggestion for future improvement. In your removeRow event listener, the condition table.tBodies[0].rows.length <= 2 works perfectly. However, for better precision and consistency with your removeColumn handler, you could use a strict equality check: table.tBodies[0].rows.length === 2. This is a minor point in an otherwise excellent implementation. Keep up the great work!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| table.tBodies[0].deleteRow(-1); | ||
| } | ||
|
|
||
| if (table.tBodies[0].rows.length <= 2) { |
There was a problem hiding this comment.
This condition works correctly. However, since your logic on line 31 prevents the number of rows from ever going below 2, a more precise check would be table.tBodies[0].rows.length === 2. This would also make the logic consistent with the removeColumn handler, which uses a strict equality check on line 69.
DEMO LINK