Build a Recipe Ingredient Converter - Step 18

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

hello!

Please write this in a single line and don’t convert the ingredient name to lowercase. Also remove the space between <li> and the ingredient name, then it should pass the test.

that’s not the problem.

it worked. thank you very much

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.