<html>
<body>
<h1>JavaScript Statements</h1>
<h2>The function Statement</h2>
<p>Declare a function that outputs "Hello World" when it is called:</p>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Hello World!";
}
myFunction();
</script>
</body>
</html>