Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add task solution #903

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

add task solution #903

wants to merge 4 commits into from

Conversation

Luk2asz
Copy link

@Luk2asz Luk2asz commented Jul 18, 2023

Copy link

@DorotaLeniecDev DorotaLeniecDev left a comment

Choose a reason for hiding this comment

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

check my comments

label.setAttribute('for', input.getAttribute('id'));
label.textContent = input.getAttribute('name');

let placeholder = label.textContent.charAt(0).toUpperCase();

Choose a reason for hiding this comment

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

You could write:

Suggested change
let placeholder = label.textContent.charAt(0).toUpperCase();
const placeholder = input.name[0].toUpperCase() + input.name.slice(1)

const inputs = document.querySelectorAll('input');

for (let i = 0; i < inputs.length; i++) {
document.createElement('label');

Choose a reason for hiding this comment

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

Do you need this line? remove it if it is not used

Copy link

@DorotaLeniecDev DorotaLeniecDev left a comment

Choose a reason for hiding this comment

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

Remove comments

label.setAttribute('for', input.getAttribute('id'));
label.textContent = input.getAttribute('name');

// let placeholder = label.textContent.charAt(0).toUpperCase();

Choose a reason for hiding this comment

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

remove commented code

// let placeholder = label.textContent.charAt(0).toUpperCase();
const placeholder = input.name[0].toUpperCase() + input.name.slice(1);

// placeholder += label.textContent.slice(1);

Choose a reason for hiding this comment

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

same here

Copy link

@Radoslaw-Czerniawski Radoslaw-Czerniawski left a comment

Choose a reason for hiding this comment

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

Nice :)

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.

3 participants