add task solution#1784
Conversation
s-slavets
commented
Jul 5, 2026
- DEMO LINK
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your solution is approved because it correctly implements createTree(element, data) with recursion, builds the nested ul/li structure from the object’s keys, and integrates properly with the DOM and SCSS setup as required. Functionally, the tree is created as expected, and there are no clear blockers that would prevent the task from working for the specified input.
One small behavioral point to be aware of: in src/scripts/main.js (around the code that creates the ul), you currently append a <ul> even when data[key] has no child keys, which results in empty lists. If you see test failures around DOM structure, you can fix this by only creating/appending ul when Object.keys(data[key]).length > 0. Also, make sure you replace https://<your_account>.github.io/js_tree-from-object-DOM/ with your real GitHub username wherever it appears and run the required npm run test commands so you can catch any subtle issues early.
Overall, the core requirements are met and the implementation is clean and readable; the remaining points are minor refinements and process checks rather than blockers. Good job on getting the recursive tree-building logic working correctly.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| ul.append(li); | ||
| } | ||
|
|
||
| element.append(ul); |
There was a problem hiding this comment.
Currently, even when data[key] has no properties, you still append a <ul> to this element, which will be empty. Depending on the tests/spec, you may need to skip creating/appending ul when there are no child keys to avoid empty lists.