laika222
5/4/2017 - 6:55 PM

Create Function and Call Function.html

<script language="javascript" type="text/javascript">

 function sayBye()
    {    
     document.write('This is where I will say something');
    }
    
  sayBye();

</script>


// DETAIL!!!


<script language="javascript" type="text/javascript">

 function sayBye() // Creates function sayBye()
    {    
     document.write('This is where I will say something'); // Within the curly brackets, defines what the function will do. In this case, it'll write a string of characters.
    }
    
  sayBye();  // Calls the function, writing the string of characters into the web page.

</script>