Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great work on the overall logic for generating the table! The calculations for age and century are implemented correctly. However, this solution requires one small change. The 'Gender' column in the table isn't displaying any data because the code attempts to access person.gender, but the property in the data object is named sex. Please update main.js to use person.sex to correctly populate the cell. After that fix, the solution will be perfect!
✨ 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
src/scripts/main.js
Outdated
|
|
||
| tr.innerHTML = ` | ||
| <td>${person.name}</td> | ||
| <td>${person.gender}</td> |
There was a problem hiding this comment.
There seems to be a small typo here. If you look at the person object structure in the people array, the property for gender is named sex, not gender. Using person.gender will result in undefined being displayed in this cell.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great work on this task! You've correctly implemented the logic for creating the table and calculating the age and century. The code is very close to being perfect.
The only issue is a small formatting requirement that's causing the automated tests to fail. The 'Gender' column currently displays 'm' and 'f', but the tests expect the full words 'Male' and 'Female'.
You can fix this by converting the person.sex value when you create the table cell. A ternary operator is a great tool for this:
${person.sex === 'm' ? 'Male' : 'Female'}Once you make that small adjustment, everything should pass. Keep up the great effort!
✨ 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
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Excellent work! You've successfully addressed the feedback from the previous review, and the code now fully meets all the requirements. The implementation is clean, the gender column is formatted correctly, and the age and century calculations are spot on. This is a great example of effective DOM manipulation. I am happy to approve this submission.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
No description provided.