remove parent node code example
Example 1: remove parent element javascript
node.parentNode.parentNode.removeChild(node.parentNode)
Example 2: delete parent js
parentElemnet.appendChild(childElemnet);
childElemnet.appendChild(buttonRemoveElement)
buttonRemoveElement.onclick = () => {perentElement.remove(childElement)}