I am new to programming and I have been looking for solutions, but what I find are more complciated solutions than it should be and I am being asked. I have this HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
</head>
<body>
<h3>Pizza toppings:</h3>
<ul id="ingredients">
<li>Batsilica</li>
<li>Tomtato</li>
<li>Morezarella</li>
<li>Hams</li>
</ul>
</body>
</html>
So I have to change the ingredients with the console. I wrote this so I get printed the list:
let toppings = document.querySelectorAll('#pizza-toppings li');
for (let i = 0; i < ingredients.length; i++) {
console.log(ingredients[i].innerText);
}
I dont know how to modify those items of the list one by one. It shouldnt be any replaceChild nor change the list completely, but selecting them and "modifying them". maybe I get the children list of the element with qSelector but still dont know how to correct the spelling of those. It is not like I can right click in the printed list and edit it.
Help? Thanks