Solution#1989
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
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
| return listParam.map((item) => ({ | ||
| name: item.textContent.trim(), |
There was a problem hiding this comment.
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.
No description provided.