Tell us what’s happening:
I’m getting the correct output but I’m not passing step 17. What am I missing?
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 convertedValue = convertQuantity(unitToConvert.value)(unit)(ingredientQuantity.value);
const item = document.createElement("li");
item.textContent = `${ingredientName.value}: ${convertedValue.toFixed(2)} ${unit}`;
resultList.appendChild(item);
}
})
}
document.querySelector("button[type='submit']").addEventListener("click", updateResultsList);
// 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/138.0.0.0 Safari/537.36
Challenge Information:
Build a Recipe Ingredient Converter - Step 17