Skip to content

fdsgfsdgsd#1847

Open
Yurii-Leniv wants to merge 2 commits intomate-academy:masterfrom
Yurii-Leniv:master
Open

fdsgfsdgsd#1847
Yurii-Leniv wants to merge 2 commits intomate-academy:masterfrom
Yurii-Leniv:master

Conversation

@Yurii-Leniv
Copy link

No description provided.

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 all functional requirements have been met. I am approving your solution.

As a point of feedback for future projects, I suggest using more descriptive variable names. For example, instead of single letters like k, m, and p, you could use names like inputName, allInputs, and inputId. This practice greatly improves code readability and makes it easier for others (and your future self) to understand and maintain. Keep up the great effort!


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

Footnotes

  1. Rate AI review example

Comment on lines +3 to +9
let k = document.querySelectorAll('form .field .field-text');

let m = Array.from(k);

m.forEach((el) => {
let k = el.getAttribute('name');
let p = el.getAttribute('id');

Choose a reason for hiding this comment

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

While this code works, using short, non-descriptive variable names like k, m, and p makes the code hard to understand. It's a best practice to use meaningful names that describe what the variable holds, for example, inputElements, inputName, or inputId.

Additionally, reusing the variable name k inside the loop (lines 3 and 8) is a practice called 'shadowing' and can be confusing. It's better to use a new, distinct variable name for the input's name attribute inside the loop.

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