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.

1 Like

I just noticed, fixed! :joy:

2 Likes

You are very much welcome. :joy:

1 Like

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