Conversation
nxqar
commented
Feb 3, 2026
- DEMO LINK
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great job implementing the core logic for calculating the total and average population! Your JavaScript code works correctly and meets most of the requirements.
However, this submission requires changes because a key constraint of the task was not met. The requirements state that only the src/scripts/main.js file should be changed, but your submission also includes modifications to src/styles/main.scss and src/styles/fonts.scss. Please revert the changes in these style files.
As a small tip for the future, your number formatting can be simplified by using the built-in number.toLocaleString('en-US') method. It's a more robust and standard approach than a custom function.
Once the unnecessary file modifications are removed, 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
src/scripts/main.js
Outdated
| function commas(num) { | ||
| const str = num.toString(); | ||
| let result = ''; | ||
| let count = 0; | ||
|
|
||
| for (let i = str.length - 1; i >= 0; i--) { | ||
| if (count > 0 && count % 3 === 0) { | ||
| result = ',' + result; | ||
| } | ||
| result = str[i] + result; | ||
| count++; | ||
| } | ||
|
|
||
| return result; | ||
| } |
There was a problem hiding this comment.
Great job implementing the number formatting logic from scratch! For future reference, you can achieve the same result much more easily using the built-in toLocaleString() method. For example: num.toLocaleString('en-US'). This method is more robust and handles various formatting rules automatically.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your JavaScript implementation is excellent! The logic for calculating and formatting the population data is correct, and you've successfully addressed the functional requirements.
However, I am requesting a change because the submission includes modifications to src/styles/_fonts.scss. A core constraint of this task, which was also highlighted in the previous review, is that only the src/scripts/main.js file must be changed.
Please revert the changes in all other files. Once your submission only contains modifications to main.js, it 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
src/styles/_fonts.scss
Outdated
| @font-face { | ||
| font-family: Roboto, Arial, Helvetica, sans-serif; | ||
| src: url('../fonts/Roboto-Regular-webfont.woff') format('woff'); | ||
| font-weight: normal; | ||
| font-style: normal; | ||
| src: url('../fonts/Roboto-Regular-webfont.woff') format('woff'); |
There was a problem hiding this comment.
According to the task requirements and the previous review feedback, you should not modify any style files. Please revert the changes in this file and ensure your submission only contains modifications to src/scripts/main.js.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Excellent work on this submission! I am approving your solution as it perfectly meets all the requirements. You've done a great job addressing the feedback from the previous review by correctly isolating your changes to the src/scripts/main.js file. The logic for calculating and formatting the total and average population is clean and correct. Well done!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨