Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great job on the recursive createTree function! The JavaScript logic is well-implemented and correctly builds the nested list. However, changes are needed in your src/index.html file due to an issue with the HTML structure. You are using an <li id="tree"> element directly inside the <body>, which is not valid HTML. According to web standards, <li> elements must always be direct children of a list element like <ul> or <ol>. To fix this, please change the container element to a more appropriate tag, such as <div id="tree"></div>. After this small but important correction, your solution will be ready for approval.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
| </head> | ||
| <body> | ||
| <script src="scripts/main.js"></script> | ||
| <li id="tree"></li> |
There was a problem hiding this comment.
Using a <li> element directly inside the <body> is not semantically correct HTML. List items (<li>) should always be children of a list element (<ul> or <ol>). Consider using a <div> as the container for your tree instead.
| ul.append(li); | ||
| } | ||
|
|
||
| element.append(ul); |
There was a problem hiding this comment.
This line appends the generated <ul> to the parent element. In the initial call, element refers to the <li id="tree"> from your index.html. While this works, using an <li> element as a direct child of <body> is not valid HTML. To fix this, you should change the container in your HTML file to a more appropriate element, like <div id="tree"></div>.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Excellent work on this submission! You've successfully addressed the feedback from the previous review by correcting the HTML structure. Your recursive createTree function is well-implemented, clean, and correctly builds the nested list as required. The solution now meets all the project requirements, so I am happy to approve it. Great job!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
No description provided.