js get elemets code example
Example 1: get element by id in javascript
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);
}