Skip to content

js_task_generate_table_DOM#1753

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

js_task_generate_table_DOM#1753
A1daros wants to merge 1 commit intomate-academy:masterfrom
A1daros:develop

Conversation

@A1daros
Copy link

@A1daros A1daros commented Feb 21, 2026

No description provided.

Copy link

@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 implements all the core requirements: you iterate over the people array, build a table row per person with six cells (name, sex/gender, born, died, computed age, and computed century), and append these rows to the table selected via document.querySelector('.dashboard'). The age calculation as person.died - person.born and the century calculation using Math.ceil(person.died / 100) both match the specification and will produce correct results. Functionally, this will render the dashboard as described, and there are no obvious syntax or runtime issues in normal conditions.

A couple of non-blocking suggestions for future improvements: consider guarding against the case where .dashboard is not found in the DOM (e.g., log an error and return early) so the script fails more gracefully in altered HTML or tests, and remove console.log(people) once you are done debugging to keep the console clean. You might also later refactor the row creation into a small helper function or give variables slightly more descriptive names for readability, but this is not required for this task. Overall, you met the task goals well—nice work on translating the data into the required table structure.


✨ 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