Skip to content

first update#1844

Open
student1232354 wants to merge 3 commits into
mate-academy:masterfrom
student1232354:develop
Open

first update#1844
student1232354 wants to merge 3 commits into
mate-academy:masterfrom
student1232354:develop

Conversation

@student1232354

Copy link
Copy Markdown

No description provided.

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary

I am requesting changes because your solution violates a core technical requirement of the task: using the provided people.json import rather than redefining const people = [...] directly in src/scripts/main.js. That local redefinition can desynchronize your code from the test data and may cause the automated tests to fail, even though your DOM logic and calculations are correct. To fix this, remove the hard-coded people array in main.js (around the top of the file where const people = [...] is declared) and rely solely on the already imported people variable from people.json as specified in the task. Functionally, your table-building logic is in good shape: you correctly compute age as died - born, century with Math.ceil(died / 100), and create six <td> cells per person before appending each <tr> to the .dashboard table. As minor improvements (not blockers), consider using clearer variable names (e.g., century instead of centuria, rowData instead of normalobj) and cleaning up leftover debugging comments once you are done. Once you switch back to the imported people data and remove the hard-coded array, your solution should fully meet the task requirements—you're very close, just need that one important adjustment.


✨ 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

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

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 fulfills all the functional requirements of the task. You import the people data from people.json, iterate over it, and create one <tr> per person with six <td> cells for name, gender, born, died, age, and century, matching the table headers in index.html. The age and century calculations (died - born and Math.ceil(died / 100)) are implemented as specified and will display the expected values for each entry. You correctly select the .dashboard table from the DOM and append each new row, and you have kept the HTML and styles unchanged as required.

One minor improvement you could consider (not required for this task) is aligning the property naming so that the gender field in your data and code uses gender instead of sex, just to mirror the table header more clearly. Overall, the implementation is clear, functional, and meets the checklist items, so you can move forward with this solution.


✨ 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