let trash
function createItem() {
let input_text = document.querySelector("#list_input").value;
document.querySelector("#to_do_list").innerHTML += "<li class = 'item'>"
+ input_text + "<button class = 'button_delete_item'></button>" + "</li>";
trash = document.querySelectorAll(".button_delete_item")
query()
}
function query() {
trash.forEach((t) => {
t.addEventListener("click", function () {
t.parentElement.remove()
})
})
}