Tell us what’s happening:
step 18 keeps giving this error- When clicking the button your updateResultsList function should properly update the DOM.
it displays the format correctly yet the error persist
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
const updateResultsList = () => {
resultList.innerHTML = "";
units.forEach(unit=>{
if(unit!==unitToConvert.value){
const result = processIngredient(Number(ingredientQuantity.value),unitToConvert.value, unit, Number(numberOfServings.value));
resultList.innerHTML +=
`<li> ${ingredientName.value.toLowerCase()}:
${result} ${unit}</li>`
}
})
}
// 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/146.0.0.0 Safari/537.36
Challenge Information:
Build a Recipe Ingredient Converter - Step 18