1// delete an element from the dom
2var elem = document.querySelector('#some-element');
3elem.parentNode.removeChild(elem);
4
5
6// keep element in dom
7var elem = document.querySelector('#some-element');
8elem.style.display = 'none';
9
1var elem = document.querySelector('#some-element');
2elem.parentNode.removeChild(elem);
3