How to find element by id in JavaScript

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