diff --git a/src/scripts/main.js b/src/scripts/main.js index a765fdb1..12338b1b 100644 --- a/src/scripts/main.js +++ b/src/scripts/main.js @@ -1,3 +1,16 @@ 'use strict'; // write code here +const collection = document.querySelectorAll('input'); + +collection.forEach(input => { + const names = input.name.split(/(?=[A-Z])/).join(' '); + + input.insertAdjacentHTML('beforebegin', ` + + `); + + input.placeholder = `${names[0].toUpperCase() + names.slice(1)}`; +});