Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Excellent work on this task! Your script correctly creates and appends the labels and placeholders as required. I'm approving your solution because it meets all the core requirements.
As a point for future improvement, consider making your element selector more specific. The requirement was to get inputs from the <form> tag. While document.querySelectorAll('input') works here, a more precise selector like document.querySelectorAll('form input') would be more robust and align more closely with the instructions. This is a good practice to ensure your code only affects the intended elements.
Keep up the great work!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| 'use strict'; | ||
|
|
||
| // write code here | ||
| const inputs = document.querySelectorAll('input'); |
There was a problem hiding this comment.
The requirement specifies to "Get all inputs from form tag on the page". Your current selector input selects all input elements on the entire document. To adhere to the requirement more strictly, you should use a more specific selector like 'form input'. This ensures you only modify inputs that are descendants of a <form> element.
No description provided.