Skip to content

task complete#2290

Open
NureSviderskyiOleksandr wants to merge 1 commit into
mate-academy:masterfrom
NureSviderskyiOleksandr:develop
Open

task complete#2290
NureSviderskyiOleksandr wants to merge 1 commit into
mate-academy:masterfrom
NureSviderskyiOleksandr:develop

Conversation

@NureSviderskyiOleksandr

Copy link
Copy Markdown
- [DEMO LINK](https://NureSviderskyiOleksandr.github.io/js_get_data_DOM/)

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary

Your solution is approved because it correctly implements all core requirements for calculating and displaying the total and average population from the DOM. You read the population values from each list item, safely convert the strings by stripping commas, sum them, and compute the average based on the number of items, which matches the task description. You then write the results back into the average-population and total-population spans, and your custom thousandsSeparator function preserves the existing comma formatting style as required. You also respected the constraint of modifying only main.js, with no changes to HTML or CSS. As minor improvement ideas (not required for this task), you could consider using a more explicit DOM selector like querySelector('span.population') and possibly Number.toLocaleString for readability, but your current approach is functionally solid. Overall, this is a clear, correct implementation that meets the checklist items and completes the task successfully.


✨ 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