Skip to content

Conversation

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

Excellent work on this task! Your solution correctly implements all the requirements, and the code is clean and well-structured. You've successfully created functions to sort the list in the DOM and parse the employee data.

I have one small suggestion for future reference. In src/scripts/main.js, the getEmployees(list) function is called, but its return value isn't assigned to a variable or used. While this fulfills the requirement to call the function, it's good practice to capture the result, for example: const employees = getEmployees(list);. This makes the code's intent clearer. This is just a minor point for improvement, and I am approving your submission.


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

Footnotes

  1. Rate AI review example

const list = document.querySelector('ul');

sortList(list);
getEmployees(list);

Choose a reason for hiding this comment

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

This function call is correct according to the task requirements. However, getEmployees returns an array, but you're not capturing or using this returned value. Since the function has no other effects, this line of code doesn't do anything. It's good practice to assign the result to a variable, like const employees = getEmployees(list);, to make it clear that you are extracting the data.

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