Tell us what’s happening:
Tutorial asks to access the length of the NodeList. I did this with NodeList.length; but the code does not pass.
It instead tells me to access the length
property of your querySelectorAll()
. I changed NodeList.length to querySelectorAll().length; but it gives me the same error.
Your code so far
function addEntry() {
const targetInputContainer = document.querySelector(`#${entryDropdown.value} .input-container`);
const entryNumber = targetInputContainer.querySelectorAll('input[type="text"]'); querySelectorAll().length;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0
Challenge Information:
Learn Form Validation by Building a Calorie Counter - Step 42