<html>
<body>
<h1>The Window Object</h1>
<h2>The addEventListener() Method</h2>
<p>Click anywhere in the window to display "Hello World!".</p>
<p id="demo"></p>
<script>
window.addEventListener("click", myFunction);
function myFunction() {
document.getElementById("demo").innerHTML = "Hello World";
}
</script>
</body>
</html>