Skip to content

solution#1991

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

solution#1991
Kateryna7465 wants to merge 2 commits into
mate-academy:masterfrom
Kateryna7465:develop

Conversation

@Kateryna7465
Copy link
Copy Markdown

  1. Replace <your_account> with your Github username in the link
  2. Follow this instructions

Copy link
Copy Markdown

@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

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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread src/scripts/main.js
age: Number(item.dataset.age)

}))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread src/scripts/main.js

sortList(list);

const employees = getEmployees(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.

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.

Comment thread src/scripts/main.js
sortList(list);

const employees = getEmployees(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.

console.log(getEmployees) logs the function reference itself, not the result. Should log the employees array returned by getEmployees.

Comment thread src/scripts/main.js
Comment on lines +32 to +37

sortList(list);

const employees = getEmployees(list);

console.log(getEmployees);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown

@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.

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.

Copy link
Copy Markdown

@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.

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.

Copy link
Copy Markdown

@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.

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.

Copy link
Copy Markdown

@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.

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.

Copy link
Copy Markdown

@etojeDenys etojeDenys left a comment

Choose a reason for hiding this comment

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

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/

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.

3 participants