Skip to content

solution#1799

Open
Kit3AWP wants to merge 3 commits intomate-academy:masterfrom
Kit3AWP:develop
Open

solution#1799
Kit3AWP wants to merge 3 commits intomate-academy:masterfrom
Kit3AWP:develop

Conversation

@Kit3AWP
Copy link
Copy Markdown

@Kit3AWP Kit3AWP commented Apr 9, 2026

- [DEMO LINK](https://Kit3AWP.github.io/js_task_generate_table_DOM/)

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

Good work on this task! You've correctly set up the loops to process the data and calculated the new 'age' and 'century' values.

However, there's a critical issue in your logic that's causing the tests to fail. You are appending the new table row (tr) to the table inside the same loop where you create the individual cells (td). This results in an incomplete row being added to the table multiple times for each person, which is why the tests can't find the expected content.

To fix this, the row should only be appended to the table after all its cells have been created. Please move the line that appends the tr to the table so it runs after the inner values.forEach loop is finished, but still inside the outer people.forEach loop. Once you make that change, your solution should work perfectly.


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

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread src/scripts/main.js Outdated

td.textContent = value;
tr.append(td);
table.append(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.

Think about when a table row is fully constructed and ready to be added to the table. Right now, you're appending the row (tr) inside the loop that creates each cell (td). This means for each person, an incomplete row is added to the table multiple times. This line should be moved outside of the values.forEach loop, but still inside the people.forEach loop.

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

Hello! While the manual review indicates you've made great progress on the logic, there's a critical issue we need to address. The automated integration test is currently failing, which prevents us from merging this solution.

The test fails because it cannot find the expected content in the table your script is supposed to generate. Specifically, it times out looking for a cell with the text 'Male', which suggests the table rows and cells are not being created or populated correctly from the people.json data.

Please review your main.js file to ensure that you are correctly iterating through the data, creating a <tr> for each person, and appending all the necessary <td> cells with the correct content to that row before adding it to the table. Once the tests pass, we'll be able to approve your work.


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

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

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'm happy to approve your solution. You've done a fantastic job addressing the previous feedback and fixing the table generation logic. The script now correctly creates and populates all the table rows with the calculated age and century, which resolves the failing integration test. Your code is clean, efficient, and meets all the requirements perfectly. Well done!


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

Footnotes

  1. Rate AI review example

Copy link
Copy Markdown

@brespect brespect left a comment

Choose a reason for hiding this comment

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

Well done! 🚀

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.

3 participants