solution#1991
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
The code has critical structural issues that prevent it from functioning as required. The main problems are: 1) Lines 32-37 contain unreachable code placed after a return statement inside getEmployees, meaning sortList(list) and the employee retrieval logic never execute. 2) Per task requirement, both functions must be called separately at module level (outside any function), not nested inside getEmployees. 3) console.log(getEmployees) logs the function reference itself rather than the result getEmployees(list). To fix: remove the nested sortList call and employees variable from inside getEmployees, and add separate calls sortList(list) and getEmployees(list) at the module level after both functions are defined. Once fixed, the code should meet all requirements and pass ESLint checks.
✨ 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
| age: Number(item.dataset.age) | ||
|
|
||
| })) | ||
|
|
There was a problem hiding this comment.
Unreachable code - sortList(list) on line 32 is placed after the return statement, making it unreachable. This should be called at module level, not inside getEmployees.
|
|
||
| sortList(list); | ||
|
|
||
| const employees = getEmployees(list); |
There was a problem hiding this comment.
Unreachable code - const employees = getEmployees(list) on line 35 is after the return statement and creates a recursive call. This should be at module level, not inside the function.
| sortList(list); | ||
|
|
||
| const employees = getEmployees(list); | ||
|
|
There was a problem hiding this comment.
console.log(getEmployees) logs the function reference itself, not the result. Should log the employees array returned by getEmployees.
|
|
||
| sortList(list); | ||
|
|
||
| const employees = getEmployees(list); | ||
|
|
||
| console.log(getEmployees); |
There was a problem hiding this comment.
Per task requirement #4, both functions should be called at module level (outside any function), not nested inside getEmployees. Move these three lines (32, 35, 36) outside the function.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: NCM]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: NCM]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: NCM]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: NCM]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
etojeDenys
left a comment
There was a problem hiding this comment.
good job
also don't forget to remove <> from the demo link
https://.github.io/js_task_parse_list_DOM/
https://kateryna7465.github.io/js_task_parse_list_DOM/
<your_account>with your Github username in the link