js remove div from dom code example
Example 1: remove div javascript
var div = document.getElementById('div-01');
div.remove();
Example 2: javascript remove element from the dom
node.remove();
var div = document.getElementById('div-01');
div.remove();
node.remove();