Solution #1785
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your solution is approved because it correctly implements the required recursive createTree(element, data) function and builds the nested ul/li structure from the object as specified. The function uses object keys as list item text, recurses for nested objects, and attaches everything to the #tree element, which satisfies the core functional requirements and avoids any blocking issues. You also wired the HTML and SCSS correctly for Parcel (linking main.scss directly), which matches the tooling constraints for the task. There are no critical blockers or broken functionality evident in the current implementation.
The only minor improvement to consider (not required for this task) is updating the <title> in index.html to something more descriptive than Title, for example, “Tree from object,” to make the page clearer. Please also remember to follow the process-oriented checklist items in your own environment, such as updating the GitHub demo link with your username and running the required test commands (npm run test, npm run test:only -- -n, npm run test:only -- -l) so you catch any issues early. Overall, you met the requirements well—nice work on the recursion and DOM handling.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Tree from object
Write a function
createTree(element, data)that creates a nested list oful/lifrom an object.Use keys as list items.
element- is a DOM elementdata- is a nested object