Tell us what’s happening:
I am adding the label element on htmlString but I am still getting errors that I should still have it. I have checked similar posts but they’re not explicitly saying how they solved the issue. Please help, this is my code below.
const HTMLString = <label>Entry ${entryNumber} Name</label>
;}
Your code so far
<!-- file: index.html -->
/* file: script.js */
// User Editable Region
function addEntry() {
const targetInputContainer = document.querySelector(`#${entryDropdown.value} .input-container`); const entryNumber = targetInputContainer.querySelectorAll('input[type="text"]').length;
const HTMLString = `<label>Entry ${entryNumber} Name</label>`;
// User Editable Region
/* file: styles.css */
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0
Challenge Information:
Learn Form Validation by Building a Calorie Counter - Step 46