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