getelemennt by id code example
Example 1: javascript get element by id
var element = document.getElementById("YourElementId");
Example 2: java script remowechild an element from the DOM
let node = document.getElementById("nested");
if (node.parentNode) {
node.parentNode.removeChild(node);
}