<html>
<body>
<h1>The Window Object</h1>
<h2>The addEventListener() Method</h2>
<p>How to pass parameter values with the
addEventListener() method.</p>
<p>Click anywhere in the window to perform a calculation.</p>
<p id="demo"></p>
<script>
let p1 = 5;
let p2 = 7;
window.addEventListener("click", function() {
myFunction(p1, p2);
});
function myFunction(a, b) {
let result = a * b;
document.getElementById("demo").innerHTML = result;
}
</script>
</body>
</html>