first update#2295
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am requesting changes because there is at least one critical checklist violation that affects the task requirements. Your main.js implementation itself looks solid: it correctly selects all .population spans, parses their values by stripping commas, computes the total and rounded average, formats them with thousands separators, and updates the .total-population and .average-population spans as required [CHECKLIST ITEMS #1–7, #12]. However, the PR currently modifies files beyond src/scripts/main.js (workflow and package files), which directly breaks the explicit constraint that only main.js should be changed for this task [CHECKLIST ITEM #9]. To fix this, revert any changes made to non-JavaScript task files and ensure that only src/scripts/main.js is modified in your submission. As a project-level follow-up, remember to update the demo GitHub link by replacing <your_account> with your actual username where it appears in the README or description [CHECKLIST ITEM #11]. Once those extra file changes are removed and the link is correctly updated, your solution will fully meet the task standards, and the functional JavaScript work you’ve done is in good shape.
✨ 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
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am requesting changes because, while your src/scripts/main.js implementation correctly reads the .population spans, converts the comma-formatted strings to numbers, computes total and rounded average, and writes the properly formatted results into .total-population and .average-population, there is a critical scope violation. The task explicitly requires that only main.js be modified, but your PR also changes README.md, package.json, package-lock.json, and .github/workflows/test.yml-template, which conflicts with the project constraints and is considered a blocking issue for acceptance. To fix this, revert any non-essential changes outside src/scripts/main.js so that only the JavaScript file is touched for this task. Make sure the demo link and any guideline-related items are handled in whatever way the assignment instructions specify, but without altering files that are not allowed for this step. As a minor improvement (not blocking), you could later refactor the repeated number-formatting logic into a helper function to keep the code DRY. Overall, the logic in main.js looks solid; once the extra file modifications are removed, you’ll be in great shape.
✨ 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
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am approving your solution as an educational override so you can keep progressing while you learn. Functionally, your main.js looks strong: you correctly read all .population spans, convert the text to numbers, compute both total and rounded average, and write back the formatted values with proper thousands separators, which aligns well with the task requirements like [CHECKLIST ITEM #2], [CHECKLIST ITEM #4], and [CHECKLIST ITEM #8]. One improvement to make next time is the duplicated 'use strict'; directive at the top of src/scripts/main.js (you only need it once, so you can safely remove the redundant one to keep the file clean). Another important learning point is scope control: the task asked you to only modify main.js after earlier feedback, so keep an eye on avoiding changes to files like README unless explicitly required by the instructions [CHECKLIST ITEM #11], [CHECKLIST ITEM #13]. Overall, your DOM handling and numeric formatting show good understanding, and with these small cleanup and scope-awareness tweaks, you’ll be in great shape for similar tasks going forward.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| 'use strict'; | ||
|
|
||
| // write your code here | ||
| 'use strict'; |
There was a problem hiding this comment.
You have two 'use strict'; directives; the second one is redundant. It doesn’t break anything, but you can safely remove one to keep the file clean.
No description provided.