The tutor prompt for this says to use the budgetNumberInput element and set the value to an empty string.
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 = '';
}
const budget = "";
}
// 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
What you have done here const budget = ""; is make a new constant variable, that has an empty string assigned.
The question doesn’t, however, want you to make a new variable. But wants you to set the value property of budgetNumberInput to an empty string.
Remember the budgetNumberInput is created and initialised at the top of the code, and got the element with the id “budget” this element has a value property that you have to reassign.