Conversation
Yevhen-Srdk
commented
Mar 9, 2026
- DEMO LINK
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great work on this task! Your solution correctly implements all the requirements, and I am approving it. The logic for sorting the list and for extracting employee data is well-written and works as expected.
I've left a couple of suggestions in the review that you can consider for future projects. For instance, in your sortList function, it's a good practice to use the list parameter for all operations to make the function more self-contained. Also, while not required here, typically the value returned by a function like getEmployees would be stored in a variable for later use.
These are just pointers for writing even more robust code in the future. Excellent job!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| }); | ||
|
|
||
| listItems.forEach((item) => { | ||
| userList.append(item); |
There was a problem hiding this comment.
It's a good practice to use the list parameter provided to the function instead of relying on the global userList variable. This makes your function more self-contained and reusable. Consider changing this to list.append(item).
| } | ||
|
|
||
| sortList(userList); | ||
| getEmployees(userList); |
There was a problem hiding this comment.
The getEmployees function returns an array of employee objects, but the returned value is not being used here. If you need this data, you should store it in a variable, for example: const employees = getEmployees(userList);.