Learn Form Validation by Building a Calorie Counter - Step 88

Tell us what’s happening:

Your code so far

what is the problem?

You need to get all of the input containers. Declare an inputContainers variable, and assign it to the value of querying the document for all elements with the class input-container .

function clearForm() {
  const inputContainers = querySelectorAll("input-container")
}

Sorry, your code does not pass. Hang in there.

You should use the querySelectorAll method to get all of the elements with the class input-container.

Hello there, welcome to the forums. I think you are missing a crucial part before calling the querySelectorAll() method. Usually, it’s a document.xyz. I think you missed that part, that’s why it’s failing.

1 Like

Hi there. Please use the “Ask for help” button so we can see your code and have a link to the challenge. This goes a long way towards helping you.

Additionally please describe the issue for us in your own words as this is an important skill.

1 Like

Thanks, that works! :rose:

I just had the same issue with this step, the solution I found was to add a “.” before “input”.

const inputContainers = document.querySelectorAll(".input-container");
2 Likes

Agree. Won’t work if without the “.”