js find html element code example
Example 1: Finding HTML Element by Id
var myElement = document.getElementById("intro");
Example 2: java script remowechild an element from the DOM
let node = document.getElementById("nested");
if (node.parentNode) {
node.parentNode.removeChild(node);
}