Learn Form Validation by Building a Calorie Counter - Step 94

Tell us what’s happening:

Hello,

I don’t understand why it’s telling me “You should modify budgetNumberInput after your for loop,” when that’s exactly what I wrote.

Your code so far

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

/* file: styles.css */

/* 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

Your browser information:

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

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 94

can you explain this change?

:sweat_smile: i understand … I thought clearForm access to budgetNumberInput with this :
function clearForm(budgetNumberInput) {

ty