-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 #1422
base: master
Are you sure you want to change the base?
Solution #1422
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job on meeting the task requirements! 🎉 The code processes the people
array correctly and dynamically creates a table to display the details. Just a small note: there's a minor typo in the gender display logic where 'Famele' should be corrected to 'Female'. Keep up the great work and attention to detail! 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
src/scripts/main.js
Outdated
} else { | ||
genderCell.textContent = 'Famele'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a typo in the word 'Famele'. It should be corrected to 'Female'. This is a minor issue but important for correct gender representation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/scripts/main.js
Outdated
} else { | ||
genderCell.textContent = 'Famele'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/scripts/main.js
Outdated
if (human.sex === 'm') { | ||
genderCell.textContent = 'Male'; | ||
} else { | ||
genderCell.textContent = 'Famele'; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use ternary operator
if (human.sex === 'm') { | |
genderCell.textContent = 'Male'; | |
} else { | |
genderCell.textContent = 'Famele'; | |
} | |
genderCell.textContent = human.sex === 'm' ? 'Male' : 'Female'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
DEMO LINK