Code to go logo
Created using Figma
Use Cases
Contribute
How to remove element from DOM in JavaScript
DOM
By Jad Joubran ·
Last updated Mar 10, 2018
<div id="box"></div>
const element = document.querySelector("#box"); element.remove();
Mar 10, 2018
1
Jad Joubran
See answer
1
Jad Joubran
ChildNode.remove
on MDN
Learn JavaScript step by step