Skip to content

add task solution#1901

Open
ATkachenkoA wants to merge 2 commits intomate-academy:masterfrom
ATkachenkoA:develop
Open

add task solution#1901
ATkachenkoA wants to merge 2 commits intomate-academy:masterfrom
ATkachenkoA:develop

Conversation

@ATkachenkoA
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 job on implementing the sorting logic and parsing the employee data! Your solution is very close, but a couple of changes are needed before it can be approved.

The main issue is a small typo in a function name in src/scripts/main.js. The task requires a function named getEmployees, but it's currently named getEmployess. Please correct the spelling to match the requirement.

Additionally, while you call the function, its returned array of employees is not being used. It's a good practice to capture this value and log it to the console, for example: console.log(getEmployees(ulElement));, to verify that your function works as expected.


✨ 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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

itemsArray.forEach((item) => list.appendChild(item));
}

function getEmployess(list) {

Choose a reason for hiding this comment

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

There's a typo in the function name. The task requires it to be named getEmployees.


sortList(ulElement);

getEmployess(ulElement);

Choose a reason for hiding this comment

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

This function returns an array of employees, but the returned value is not being used. Consider logging it to the console to verify that the function works correctly, for example: console.log(getEmployess(ulElement));.

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 job addressing the feedback from the previous review! Your solution now meets all the requirements, and the functionality is working perfectly. I am approving your submission.

I have one small suggestion for a minor cleanup. In src/scripts/main.js, the getEmployees function is called twice in a row, but the result of the first call isn't used. You can safely remove this redundant line to make the code a bit cleaner.

This is just a minor tip, and your work is excellent as is. Keep up the great work!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example


sortList(ulElement);

getEmployees(ulElement);

Choose a reason for hiding this comment

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

This call to getEmployees is redundant because its return value is not used. The function is called again on line 41 where the result is correctly passed to console.log. You can safely remove this line.

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