Learn Form Validation by Building a Calorie Counter - Step 94

Tell us what’s happening:

it shows the error of “you should modify the budgetNumberInput after your for loop” i have tried everything but it didnot work

Your code so far

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

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

function clearForm(budgetNumberInput) {
  const inputContainers = Array.from(document.querySelectorAll('.input-container'));

  for (const container of inputContainers) {
    container.innerHTML = '';
  }
   budgetNumberInput.value = '';  
}

// User Editable Region
/* file: styles.css */

Your browser information:

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

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 94

Welcome to the forum @sachinXettri07

Here is a comparison of the original code and your code.

The code in blue is the original code, the code in red is your code.
The code in magenta is the overlap.

image

It looks like you added a parameter to the function.
Try removing it.
Only modify the code if you are instructed to do so.

Happy coding

1 Like

ohh dam I put it for test and forgot to remove thanks anyways

1 Like