when should i use addEventlistener or code example
Example: javascript addeventlistener
var element = document.getElementById("#id");
element.addEventListener('click', function(){
console.log("click");
});
var element = document.getElementById("#id");
element.addEventListener('click', function(){
console.log("click");
});