Learn Form Validation by Building a Calorie Counter - Step 40

Tell us what’s happening:

I cannot for the life of me figure out what is wrong with the targetInputContainer variable where it keeps throwing the error that I should pass targetId to the querySelector() method after checking the forums. Any help is appreciated!

Your code so far

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

/* file: styles.css */

/* file: script.js */
// User Editable Region

function addEntry() {
  const targetId = '#' + entryDropdown.value;
  const targetInputContainer = document.querySelector(`#${targetId} .input-container`);
}

// 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/127.0.0.0 Safari/537.36

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 40

Hi, it’s worked when you use classical string and `document.querySelector(your var + " your string".)

hi there!
instruction is asking you to:
Use concatenation to separate targetId and '.input-container' with a space, and pass that string to querySelector()

you did not need to use template literals syntex and id # tag. simply add targetId and ' .input-container'.
make sure you have one space after targetId and one space between the first quote mark and . dot of ' .input-container' class.