-
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 #1418
base: master
Are you sure you want to change the base?
solution #1418
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.
Thank you for your hard work on this task! However, there are a few critical issues that need to be addressed before we can approve the pull request.
-
Incorrect Property Names: The properties
birth
,death
, andgender
do not exist in thepeople
objects. Please update them toborn
,died
, andsex
respectively to ensure the code functions correctly. -
Incorrect Table Selector: The query selector
'dashboard'
is incorrect. If you are trying to select an element by class, please use'.dashboard'
. This change is necessary for the table to be correctly selected and displayed.
These changes are essential for the code to meet the task requirements and function as expected. Once you address these issues, your solution will be in great shape! Keep up the good work, and don't hesitate to reach out if you need further assistance. 😊
✨ 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.
src/scripts/main.js
Outdated
|
||
const genderCell = document.createElement('td'); | ||
|
||
genderCell.textContent = person.gender; |
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.
The property gender
does not exist in the people
objects. It should be sex
instead of gender
to correctly access the gender information.
src/scripts/main.js
Outdated
|
||
const birthCell = document.createElement('td'); | ||
|
||
birthCell.textContent = person.birth; |
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.
The property birth
does not exist in the people
objects. It should be born
instead of birth
to correctly access the birth year.
src/scripts/main.js
Outdated
|
||
const deathCell = document.createElement('td'); | ||
|
||
deathCell.textContent = person.death; |
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.
The property death
does not exist in the people
objects. It should be died
instead of death
to correctly access the death year.
src/scripts/main.js
Outdated
centuryCell.textContent = Math.ceil(person.death / 100); | ||
row.appendChild(centuryCell); | ||
|
||
const table = document.querySelector('dashboard'); |
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.
The query selector 'dashboard'
might be incorrect. Ensure that there is an element with the tag name dashboard
in your HTML. If you meant to select an element by ID or class, use '#dashboard'
or '.dashboard'
respectively.
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.
Your code has made significant progress, and I'm approving this pull request to help you move forward with your learning journey. However, there are a few critical issues that need your attention:
-
Incorrect Property Names: The property
dead
is used in your code, but it should bedied
to match the data structure. This change is crucial for accurate age and century calculations. -
Table Selector: You've correctly used
document.querySelector('.dashboard')
to select the table, which is great!
Please make sure to address the property name issue in future iterations to ensure your code functions as expected. Keep up the good work, and continue learning from these experiences! 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
|
||
const deathCell = document.createElement('td'); | ||
|
||
deathCell.textContent = person.dead; |
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.
The property dead
does not exist in the people
objects. It should be died
to match the data structure.
|
||
const ageCell = document.createElement('td'); | ||
|
||
ageCell.textContent = person.dead - person.born; |
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.
The property dead
should be died
to correctly calculate the age.
|
||
const centuryCell = document.createElement('td'); | ||
|
||
centuryCell.textContent = Math.ceil(person.dead / 100); |
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.
The property dead
should be died
to correctly calculate the century.
No description provided.