Learn Form Validation by Building a Calorie Counter - Step 49

Tell us what’s happening:

im not sure why but my code keeps throwing the error
you should add an input element on a new line

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* 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 for="${entryDropdown.value}-${entryNumber}-name">Entry ${entryNumber} Name</label>`;
<input type="text" id="${entryDropdown.value}-${entryNumber}-name" placeholder="Name" />;
}

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 49

The input element should be contained within the template literal backticks.

Look for and observe the location of the backticks. Make sure your code is within them.

Ps. Also only one semi colon is needed at the end of this statement.

`<input type="text" id="${entryDropdown.value}-${entryNumber}-name" placeholder="Name" />`;

i add the backticks and i could only find one simicolon for this particular statment but im still geting the same error code

Hi @ryanstruckus

Try removing the back tick before the new input element.

Happy coding