Learn Form Validation by Building a Calorie Counter - Step 94

Tell us what’s happening:

The tutor prompt for this says to use the budgetNumberInput element, the budgetNumberInput element has been used but it still appears to be wrong…

Your code so far

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

/* file: styles.css */

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

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

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

  budgetNumberInput = "";
}

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

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 94

Hi @booleanmethod9

Your clearForm function should access the value property of the budgetNumberInput element.

Happy coding

It says to set the budgetNumberInput to an empty string…

This is the instruction for the step:

Set the value property of budgetNumberInput to an empty string.

Yup. Isn’t that how to set it to an empty string?

Hi there!

Where is the value property

like this?:
budgetNumberInput = "value";

Oh, it says value property of…
sometimes you have to re read these things

Its all passed and done, thank you for the help that made me see this!
(cc: @Teller )

2 Likes

OK, you’re getting close! You just have to take the value out of that constant.