add task solution#2010
Conversation
mariiaherasymiukdev-bit
commented
Jun 18, 2026
- DEMO LINK
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am approving your solution because the core JavaScript functions meet all the specified functional requirements. Your sortList(listElement) correctly reads salaries from data-salary as strings, converts them to numbers via a helper like parseSalary, sorts the list items in descending order, and appends them back to the <ul> element, satisfying [CHECKLIST ITEM #1, #3, #15, #16, #17]. The getEmployees(listElement) function properly builds an array of employee objects with name, position, salary, and age fields, converting salary and age to numbers as required by [CHECKLIST ITEM #2, #4, #5, #6]. You also correctly select the list from the DOM using document.querySelector('ul') and invoke both sortList(list) and getEmployees(list), which aligns with [CHECKLIST ITEM #14, #18, #19].
One small improvement you might consider (not required for this task) is to use or log the result of getEmployees(list) so its purpose is more visible and easier to test or debug. Non-code checklist items like updating the README demo link and running the test commands cannot be fully verified from this file alone, but there is no indication of any blocking issues in your implementation. Overall, your code is clear, focused on the requirements, and functionally correct—well done.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨