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