Skip to content

Substitute Calculate it text! to calculated total and average values - #2389

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

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

Conversation

@JuliaTr

@JuliaTr JuliaTr commented Nov 2, 2026

Copy link
Copy Markdown

@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 implementation successfully meets all the task requirements. The code correctly retrieves population data from spans, converts strings to numbers, calculates both total and average values, formats them with thousands separators using your custom insertSeparators function, and replaces the 'Calculate it!' placeholder text in the target elements. All checklist items pass, including the correct username in the demo link.

There are two minor improvements you could consider for future robustness: using el.classList.contains(searchClass) instead of exact class matching (currently works fine with your HTML structure), and using more descriptive variable names like formattedTotal and formattedAverage instead of totalSep and averageSep. These are optional refinements that don't affect the current functionality.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example ↩

This branch has not been deployed

No deployments
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