the function tag in js
snippet in html

the function tag in js

user3473

<html>
  <p id = demo> </p>
  <p> this javascript function is returning the product of p1 and p2.
 <script>
   function myFunction (p1, p2){
   return p1 * p2
   }
   document.getElementById("demo").innerHTML = myFunction(8, 8)
  </script>

the function tag in js

user5259

function myFunction() {
console.log('Party time')
}
myFunction();

the function tag in js

user2805

<html>
    <head>
    
    </head>
    <body>
        <p id = demo> </p>
        <script>
            function myEquation(p1, p2, p3, p4) {
                return p1 * p2 * p3 * p4
            }
            document.getElementById("demo").innerHTML = myEquation(8, 7, 1, 9);
        </script>
        <p> 504 is the answer of my function that made the script say 8x7x1x9.
    </body>
</html>