Skip to content

Solution #1785

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

Solution #1785
Sofiia912 wants to merge 1 commit into
mate-academy:masterfrom
Sofiia912:develop

Conversation

@Sofiia912

Copy link
Copy Markdown

Tree from object

Write a function createTree(element, data) that creates a nested list of ul/li from an object.
Use keys as list items.

element - is a DOM element

data - is a nested object

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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! ✨

Footnotes

  1. Rate AI review example

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