Learn Form Validation by Building a Calorie Counter - Step 40

Tell us what’s happening:

I can’t seem to figure out why its not passing, Ive researched other answers and articles and I just dont understand what im doing wrong.

Your code so far

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

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

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

// User Editable Region
/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Safari/605.1.15

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 40

hi and welcome to the forum.

For this step they asked you to:

Use concatenation to separate targetId and '.input-container' with a space, and pass that string to querySelector() .

So this ‘concatentation’ they are looking for would be the plus + operator.
The way you did it is correct, but not what they wanted.
So please rewrite it to not use the template literal and backticks.

ahhhhhh I see it now. Just gotta read directions better haha Thank you!

1 Like