Skip to content

Commit

Permalink
Solution
Browse files Browse the repository at this point in the history
  • Loading branch information
wsadocha committed Dec 16, 2023
1 parent 0c67e89 commit 9f12e90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function capitalize(string) {
return string[0].toUpperCase() + string.slice(1);
}

function makeRealWords(string) {
function makeWords(string) {
if (string.toLowerCase() === string) {
return string;
}
Expand All @@ -21,7 +21,7 @@ const inputs = document.querySelectorAll('input');

for (const input of inputs) {
const labelElement = document.createElement('label');
const inputName = makeRealWords(input.name);
const inputName = makeWords(input.name);

labelElement.textContent = inputName;
labelElement.setAttribute('for', input.id);
Expand Down

0 comments on commit 9f12e90

Please sign in to comment.