Skip to content

add task solution#2010

Open
mariiaherasymiukdev-bit wants to merge 1 commit into
mate-academy:masterfrom
mariiaherasymiukdev-bit:develop
Open

add task solution#2010
mariiaherasymiukdev-bit wants to merge 1 commit into
mate-academy:masterfrom
mariiaherasymiukdev-bit:develop

Conversation

@mariiaherasymiukdev-bit

Copy link
Copy Markdown

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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! ✨

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