Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <h1>The Window Object</h1> <h2>The setTimeout() Method</h2> <p>In this example, we display the parameters passed to myFunc().</p> <p id="demo"></p> <script> setTimeout(function() {myFunc("param1", "param2")}, 2000); function myFunc(p1, p2) { document.getElementById("demo").innerHTML = "Parameters: " + p1 + " " + p2; } </script> </body> </html>