Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am approving your solution because it fully implements the required functionality and handles the data correctly. Your script gathers all elements with the .population class, strips thousands separators from their text content, converts those values to numbers, and then accurately computes both the total and average population. You then update the .total-population and .average-population elements with these results, formatting them using toLocaleString('en-US') so that the output includes proper thousands separators. This matches the task requirements and ensures the page displays readable numerical results without runtime errors. Nicely done keeping the logic clear and focused on the specified behavior.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am approving your solution because it correctly fulfills the required functionality. Your script selects all elements with the .population class, strips thousands separators, converts the text content to numbers, and then accurately computes both the total and average population. You then insert these computed values into the .total-population and .average-population elements, formatting them with toLocaleString('en-US') so they display with proper thousands separators. This behavior matches the task requirements and will work for the specified input format without causing runtime errors. Nicely done implementing both the data processing and the user-facing formatting cleanly and clearly.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
https://Br0No.github.io/js_get_data_DOM/