How to make remove buttoon on table using js DOM
var td5 = document.createElement('td');
td5.setAttribute("id", "td5");
td5.innerHTML = `<button onclick=remove(this.parentElement)> X </button>`
tr.appendChild(td5);
}
}
function remove(element) {
element.parentElement.remove(element);
console.log(element.parentElement);
allMovie.splice(tr, 1);
set();
}