Skip to content

solution#1803

Open
OlehYuriev wants to merge 1 commit intomate-academy:masterfrom
OlehYuriev:develop
Open

solution#1803
OlehYuriev wants to merge 1 commit intomate-academy:masterfrom
OlehYuriev:develop

Conversation

@OlehYuriev
Copy link
Copy Markdown

- [DEMO LINK](https://OlehYuriev.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

Your solution is approved because it correctly iterates over the people array, creates table rows with six cells in the required order (name, gender, born, died, age, century), and appends them to the .dashboard table’s tbody as the task describes. The calculations for age (died - born) and century (Math.ceil(died / 100)) are accurate and satisfy the functional requirements, so there are no blocking issues preventing task completion.

While not mandatory for this task, consider adding a small safety guard around the part where you select the table and its tbody (the code that calls document.querySelector('.dashboard') and querySelector('tbody')), for example by returning early if either is missing, to avoid potential runtime errors in non-standard environments. You might also think about how to handle unexpected gender values more explicitly, in case the data changes in the future. For very large datasets, building rows in a DocumentFragment before appending them to the DOM could offer a minor performance improvement, though for this exercise your current approach is perfectly fine. Overall, the implementation is clear, readable, and fulfills the assignment requirements well—nice work.


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

Footnotes

  1. Rate AI review example

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