Learn Form Validation by Building a Calorie Counter - Step 39

Hi, I dont know why it doest pass. I tried many times.

function addEntry() {
const targetId = ‘#’ + entryDropdown.value;
const targetImputContainer = document.querySelector(${targetId} .input-container);
}

1 Like

Hey.
What lesson name is this?

Learn Form Validation by Building a Calorie Counter - Step 39

I do not see a template literal in your code. The contents in the querySelector should be nested in backticks.

I did. Still doesnt work.

Can I see the corrected code?

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

I dont know what it missing, I tried adding const templateLiteral = and nothing.

Something is off here.

I just noticed, fixed! :joy:

1 Like

You are very much welcome. :joy: