How to replace element content HTML in JavaScript

DOM
By Jad Joubran · 
Last updated Mar 11, 2018
<div id="box"></div>
const element = document.querySelector("#box");

element.innerHTML = `<div>New Content</div>`;