Learn Form Validation by Building a Calorie Counter - Step 39

Tell us what’s happening:

What’s wrong in the below code ?

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

Console output:

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 39

Variables can be passed in to a template literal by surrounding the variable with ${}

You are missing something…

2 Likes

The hash tag has to be joined to the variable and its ${} immediately before wihtout any other characters inside the ticks.

شرکت غرفه سازی پیشرو پیشگام رو ببینید.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.