Repository navigation
make solution - #2108
make solution#2108insomniaorno wants to merge 1 commit into
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
The list sorting and employee extraction behavior are otherwise implemented, but one explicit requirement remains unmet: salary-string conversion is duplicated inline instead of being handled by a helper. In src/scripts/main.js, extract the conversion into a helper and call it from both the sort comparator and getEmployees, so both paths use the same conversion logic. This is the only required change identified; the other reviewed behaviors meet the stated requirements.
✨ 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
|
|
||
| items.sort( | ||
| (a, b) => | ||
| +b.dataset.salary.replaceAll('$', '').replaceAll(',', '') - |
There was a problem hiding this comment.
The task explicitly requires a helper function to convert the salary string to a number. The conversion is currently duplicated inline; extract it into a helper and use it in both the sort comparator and getEmployees.
DEMO LINK