Skip to content

parse-list - #2053

Open
notbelievable wants to merge 2 commits into
mate-academy:masterfrom
notbelievable:develop
Open

parse-list#2053
notbelievable wants to merge 2 commits into
mate-academy:masterfrom
notbelievable:develop

Conversation

@notbelievable

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

The function getEmployee must be renamed to getEmployees to match the explicit requirement specification. Additionally, the call site that invokes this function (getEmployee(listt)) needs to be updated to use the new function name. The current implementation is inconsistent with the task requirements, which will cause the function to be unfindable if tests or other code expect a function named getEmployees. Please rename both the function definition and all call sites accordingly.


✨ 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

Comment thread src/scripts/main.js Outdated
Comment on lines +18 to +19

function getEmployee(list) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The function is named getEmployee but the requirements explicitly state the function should be named getEmployees (plural). Please rename to match the specification.

Comment thread src/scripts/main.js Outdated
Comment on lines +28 to +29
sortList(listt);
getEmployee(listt);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The function is called as getEmployee(listt) but if renamed to getEmployees, this line should be updated to match. Also, consider capturing the return value since getEmployees returns an array of employees that should likely be used somewhere.

@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

Your solution is approved. Both sortList and getEmployees functions are correctly implemented with the proper schema - employee objects contain name, position, salary, and age. The sorting logic properly handles descending order by salary using sort((a, b) => getNumber(b) - getNumber(a)), and the helper function getNumber correctly converts salary strings to numbers. All task requirements are satisfied, and no issues were identified in the review.


✨ 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