Skip to content

Solution#1989

Open
nyarachun wants to merge 1 commit into
mate-academy:masterfrom
nyarachun:develop
Open

Solution#1989
nyarachun wants to merge 1 commit into
mate-academy:masterfrom
nyarachun:develop

Conversation

@nyarachun
Copy link
Copy Markdown

No description provided.

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

Your solution correctly implements both sortList and getEmployees functions that meet the core requirements. The functions properly sort employees by salary in descending order and return employee objects with all required properties. There's one consistency improvement worth noting: name is extracted using textContent.trim() while position, salary, and age use data attributes (dataset.*). Since the task emphasizes using data attributes consistently, consider updating the name extraction to also use a data attribute like item.dataset.name for uniformity across all employee properties.


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

Footnotes

  1. Rate AI review example

Comment thread src/scripts/main.js
Comment on lines +27 to +28
return listParam.map((item) => ({
name: item.textContent.trim(),
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 name property is extracted from textContent.trim() which includes all text content (position, salary, etc.). For consistency with other properties (position, salary, age) which use data attributes, name should also use a data attribute like item.dataset.name.

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