Tell us what’s happening:
Hello, I don’t have a question about how to do the level but about what’s in the document.querySelector. I thought only id’s from HTML could go in the () how is there the targetId variable and what/where in the code is the ’ .input-container’
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 + ' .input-container');
}
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 OPR/109.0.0.0
Challenge Information:
Learn Form Validation by Building a Calorie Counter - Step 41