Learn Form Validation by Building a Calorie Counter - Step 40

Tell us what’s happening:

i can not understand where i should concatenate ‘.input-container’
this is my code :
function addEntry() {
const targetId = ‘#’ + entryDropdown.value;
const targetInputContainer = document.querySelector(targetId);
}

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(targetId); 
  
}

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 40

Welcome to our community!

Reread the instructions: "… Use concatenation to separate targetId and '.input-container' with a space, and pass that string to querySelector()

You have only passed ‘targetId’ to ‘querySelector()’.

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