Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Excellent work on this task! Your solution correctly implements the core logic to parse the population data, calculate the total and average, and update the page. I am approving your submission.
One small point of feedback for future reference: the calculated average is currently displayed as a floating-point number. To fully match the numeric style of the population data (which are whole numbers), you could round the average to the nearest integer before displaying it. Using Math.round() before calling toLocaleString() is a great way to do this.
Overall, this is a solid implementation. Well done!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| total.toLocaleString(); | ||
|
|
||
| document.querySelector('.average-population').textContent = | ||
| average.toLocaleString(); |
There was a problem hiding this comment.
The average can be a floating-point number, but the task requires the output to match the numeric style of the population data, which are whole numbers. Consider rounding the average to the nearest integer before converting it to a string to meet this requirement.
[x] DEMO LINK