How to remove element from dom in JavaScript

DOM
Last updated Mar 10, 2018
<div id="box"></div>
const element = document.querySelector("#box");

element.remove();