Skip to content

add task solution#2183

Open
nols212 wants to merge 2 commits intomate-academy:masterfrom
nols212:develop
Open

add task solution#2183
nols212 wants to merge 2 commits intomate-academy:masterfrom
nols212:develop

Conversation

@nols212
Copy link

@nols212 nols212 commented Feb 14, 2026

  1. Replace <your_account> with your Github username in the 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

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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

}

const totalFormat = total.toLocaleString('en-US');
const averageFormat = average.toLocaleString('en-US');

Choose a reason for hiding this comment

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

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.

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 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! ✨

Footnotes

  1. Rate AI review example

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