updating h1 with add event listener input javascript code example
Example: javascript onclick event listener
document.getElementById("myBtn").addEventListener("click", function() {
alert("Hello World!");
});
document.getElementById("myBtn").addEventListener("click", function() {
alert("Hello World!");
});