Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Good work on this task! You've correctly implemented the logic to parse the data from the DOM and calculate the total population.
However, this submission requires a change regarding the average population calculation. The task requires the average to be displayed in the 'same numeric style as populations presented,' which are whole numbers. Your current solution displays the average with decimal places, which doesn't meet this requirement.
To fix this, please round the average value to the nearest whole number before you format it with toLocaleString(). A function like Math.round() would be perfect for this. After this small adjustment, your solution will be ready for approval!
✨ 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
| } | ||
|
|
||
| const totalFormat = total.toLocaleString('en-US'); | ||
| const averageFormat = average.toLocaleString('en-US'); |
There was a problem hiding this comment.
The task requires the calculated average to have the 'same numeric style as populations presented,' which are whole numbers. Your current implementation might display a number with decimal places. Consider rounding the average value before formatting it to ensure it's a whole number.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Excellent work on this update! I'm happy to approve your solution. You've successfully addressed the feedback from the last review by rounding the average population to a whole number. The code is now clean, correct, and meets all the project requirements. Great job!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
<your_account>with your Github username in the link