refactoring

This commit is contained in:
Technoir committed 2026-09-29 12:02:36 +02:00
1 parent 5f3a6c56f9
commit 882bc0e577
1 file changed
+3 -4
+3 -4
View File
@@ -7,8 +7,8 @@ const itemListElement = document.querySelector(".list__displayedList");
let listElements = []; // Liste der erstellten Items und Kategorien
function addCategory() {
listCategories.push(new ShoppingCategory(categoryName));
function addNewCategory(categoryName) {
listElements.push(new ShoppingCategory(categoryName));
return 0;
}
@@ -25,8 +25,7 @@ function addNewItem(itemName, itemAmount, category) {
}
function renderList() {
function renderItemList() {
listElements = listElements.filter(item => !item.remove)
itemListElement.innerHTML = ""; //reset innerItemList