Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solution #1420

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

solution #1420

wants to merge 2 commits into from

Conversation

DimaK88
Copy link

@DimaK88 DimaK88 commented Mar 3, 2025

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.

It looks like there's a small but important issue with the gender display logic in your code. Currently, the code is incorrectly labeling females as 'Male' and males as 'Female'. To fix this, you should update the condition to person.sex === 'f' ? 'Female' : 'Male'. Once this is corrected, your solution will accurately represent the data. Keep up the great work, and don't hesitate to reach out if you need any help! 😊

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

🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review button in the Reviewers tab.


newRow.innerHTML = `
<td>${person.name}</td>
<td>${person.sex === 'f' ? 'Male' : 'Female'}</td>

Choose a reason for hiding this comment

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

There is a logic error in this line. The condition should be person.sex === 'f' ? 'Female' : 'Male' to correctly display the gender. Currently, it is displaying 'Male' for females and 'Female' for males, which is incorrect.

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.

Your code has been reviewed and is approved! 🎉

You've successfully corrected the gender display logic, ensuring that males are labeled as 'Male' and females as 'Female', which aligns perfectly with the task requirements. The code now correctly iterates over the people array, generates a table from the JSON data, calculates age and century, and appends the rows to the table with the class dashboard.

While the code meets the task requirements and constraints, always remember to review any comments provided to further enhance your coding skills. If there are any critical issues, they should be addressed in future projects to avoid similar problems. Keep up the great work and continue learning from each experience! 🚀

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

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