Tell us what’s happening:
They say " you should remove the targetId and i did but the code doesn’t pass.
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(`.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/143.0.0.0 Safari/537.36
Challenge Information:
Learn Form Validation by Building a Calorie Counter - Step 43
That’s not what you were asked to remove though.
Thanks to template literals, you actually don’t need the targetId variable at all. Remove that variable
const targetInputContainer = document.querySelector(`${} .input-container`);
???
ILM
6
it does not look like you have the requested value in the template literal, you need to replace targetId there, not just delete it
Please use words to talk about how you are stuck instead of just posting code and hoping we’ll fix it.
apologize, i was asked to remove targetId and even tho i did so, the code doesn’t pass.
I’m not yet familiar with js, thats why i find this a little bit confusing
ILM
10
you are asked to remove the variable, and replace it in the template literal
it says
and update your template literal to replace targetId with entryDropdown.value – remember to add # before that, in the string.
you did not do this part
Noted, thank you so much!