Skip to content

Dev#1800

Open
10hokageee wants to merge 2 commits intomate-academy:masterfrom
10hokageee:dev
Open

Dev#1800
10hokageee wants to merge 2 commits intomate-academy:masterfrom
10hokageee:dev

Conversation

@10hokageee
Copy link

Copy link

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

Choose a reason for hiding this comment

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

Review Summary

Excellent work on this task! Your script correctly adds the required labels and placeholders, and the form's functionality is perfect. I am approving your solution as it meets all the core requirements.

One small suggestion for future improvement: the task asked to select inputs from within the form tag. Your selector document.querySelectorAll('.field-text') queries the entire document. A more precise approach would be document.querySelectorAll('form .field-text'). This scopes the search to just the form, making the code more robust if other elements with the same class existed elsewhere on the page. This is just a best practice tip for an otherwise great submission. Keep up the fantastic work!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

'use strict';

// write code here
const inputs = [...document.querySelectorAll('.field-text')];

Choose a reason for hiding this comment

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

According to the task description, you should "Get all inputs from form tag on the page". Your current selector '.field-text' selects these elements from the entire document. It's better practice to scope your selector to the form, for instance, by using 'form .field-text', to make the code more robust and aligned with the requirements.

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