Skip to content

Add task solution#2206

Open
botqqku wants to merge 1 commit intomate-academy:masterfrom
botqqku:develop
Open

Add task solution#2206
botqqku wants to merge 1 commit intomate-academy:masterfrom
botqqku:develop

Conversation

@botqqku
Copy link

@botqqku botqqku commented Mar 10, 2026

[x] DEMO LINK

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.

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

  1. Rate AI review example

total.toLocaleString();

document.querySelector('.average-population').textContent =
average.toLocaleString();

Choose a reason for hiding this comment

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

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.

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