Skip to content

Develop#2262

Open
Kateryna7465 wants to merge 4 commits into
mate-academy:masterfrom
Kateryna7465:develop
Open

Develop#2262
Kateryna7465 wants to merge 4 commits into
mate-academy:masterfrom
Kateryna7465:develop

Conversation

@Kateryna7465
Copy link
Copy Markdown

Replace <your_account> with your Github username in the link
- DEMO LINK
2. Follow this instructions
- There are no tests for this task so use npm run lint command instead of npm test

Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

Review Summary

The code has a critical typo that prevents the average population value from displaying correctly. On line 24, .avarage-population should be .average-population (note the 'a' vs 'e' spelling). While your calculation logic is correct and the total population display works properly, this typo means the average value will never appear in the intended span element. This is a blocker since the task specifically requires targeting average-population class. Please fix this spelling error and the implementation will be complete.


✨ 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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread src/scripts/main.js Outdated
document.querySelector('.total-population').textContent =
total.toLocaleString();

document.querySelector('.avarage-population').textContent =
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The task requires targeting span with class average-population, but the code queries .avarage-population (typo: 'avarage' vs 'average'). This will cause the average value to not be displayed in the correct element. Change '.avarage-population' to '.average-population'.

Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

Review Summary

On line 22, the class selector .aveditrage-population is misspelled. The average calculation is correct, but the value will never appear in the intended <span> element because the selector doesn't match the HTML. Change 'aveditrage' to 'average' so the selector becomes .average-population. This is required for checklist items #5 and #13.


✨ 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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread src/scripts/main.js Outdated
document.querySelector('.total-population').textContent =
total.toLocaleString();

document.querySelector('.aveditrage-population').textContent =
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Typo in class name - should be .average-population not .aveditrage-population. This prevents the calculated average from displaying in the correct element.

Copy link
Copy Markdown

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

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 and fully meets all task requirements. The previous issue with the misspelled class selector ".aveditrage-population" has been successfully fixed to ".average-population", allowing your calculated values to populate the correct HTML elements. Your implementation correctly parses population data from the span elements, converts strings to numbers, calculates both total and average populations, and formats the output with thousands separators using ".toLocaleString()". Great job catching and fixing that typo - these kinds of attention-to-detail issues are common and your fix shows solid debugging skills. Keep up the excellent work!


✨ 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