()
| 86 | |
| 87 | // clear items |
| 88 | function clearItems() { |
| 89 | const items = document.querySelectorAll(".grocery-item"); |
| 90 | if (items.length > 0) { |
| 91 | items.forEach(function (item) { |
| 92 | list.removeChild(item); |
| 93 | }); |
| 94 | } |
| 95 | container.classList.remove("show-container"); |
| 96 | displayAlert("empty list", "danger"); |
| 97 | setBackToDefault(); |
| 98 | localStorage.removeItem("list"); |
| 99 | } |
| 100 | |
| 101 | // delete item |
| 102 |
nothing calls this directly
no test coverage detected