<html>
<body>
<h1>The Window Object</h1>
<h2>The setInterval() and clearInterval() Methods</h2>
<p id="demo1"></p>
<p id="demo2" style="color:red;"></p>
<script>
setInterval(function() {myFunc("param1", "param2")}, 2000);
function myFunc(p1, p2) {
document.getElementById("demo1").innerHTML += "Hello";
document.getElementById("demo2").innerHTML = "Parameters: " + p1 + " " + p2;
}
</script>
</body>
</html>