Learn Form Validation by Building a Calorie Counter - Step 67

Tell us what’s happening:

hello there, im kind of stuck on the step 67 as i dont understand what is wrong with what i’ve written so far.
Declare a breakfastNumberInputs variable, and give it the value of calling document.querySelectorAll() with the selector #breakfast input[type=number] . This will return any number inputs that are in the #breakfast element.
If i understand correctly, the queryselectorAll() will list all the items that have the type number in the block with the id of #breakfast. I have looked up the function, and i dont understand why the arguments ive put in the function are wrong.

Your code so far

function calculateCalories(e) {
e.preventDefault();
isError = false;
const breakfastNumberInputs = document.queryselectorAll(“#breakfast input[type=number]”);

}

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

function calculateCalories(e) {
  e.preventDefault();
  isError = false;
  const breakfastNumberInputs = document.queryselectorAll("#breakfast input[type=number]");

}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 67

Consider the Casing here. Remember camelCase?

1 Like