How to listen to click event in JavaScript

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

element.addEventListener("click", event => {
  console.log("Element clicked");
});