Learn Form Validation by Building a Calorie Counter - Step 69

Tell us what’s happening:

I have a code like this and I have read it according to the instructions, but why is there still an error? with a message like this: You should call document.querySelectorAll() with #breakfast input[type=number].

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

function calculateCalories(e) {
  e.preventDefault();
  isError = false;

   const breakfastNumberInputs = document.querySelectorAll("#breakfast input[type='number']");
}

// 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/127.0.0.0 Safari/537.36

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 69

Hi there!
Your given link is not correct. Add correct link to the challenge step.
Edit: use Help button for creating topic properly on the forum.

Thank you for the information, but I have followed the steps given, click “help” and “create topic properly on the forum” this is the result.

You have accidentally deleted some letters from the link copy the challenge link again and post it here.
Edit: you can see extra words preformatted text with the link.

done it , thank you for the information and can you help me with what happened to my code

You did’t need quote marks around number.

Thank you very much, I hope you are always given convenience in every matter sirrrrr

1 Like

Hi @hasanzaib1389 ,
I’m trying to understand, why there is no need for quote marks around number. The opposite is the case for the addEntry() function (Step 44). Does this mean we can also go without the quote marks at breakfastNumberInputs variable in that function and in any similar case?

hi there!
it’s tested with a regex that does not expect quotes, that’s why it doesn’t pass. but the quote marks around attribute value is also correct.

Hmm, so both notations can be used. That’s good to know. Thank you very much for your support!

1 Like