Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
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! ✨
No description provided.