Skip to content

add solution#1936

Open
Yevhen-Srdk wants to merge 1 commit intomate-academy:masterfrom
Yevhen-Srdk:develop
Open

add solution#1936
Yevhen-Srdk wants to merge 1 commit intomate-academy:masterfrom
Yevhen-Srdk:develop

Conversation

@Yevhen-Srdk
Copy link

Copy link

@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

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

  1. Rate AI review example

});

listItems.forEach((item) => {
userList.append(item);

Choose a reason for hiding this comment

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

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);

Choose a reason for hiding this comment

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

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);.

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