Please send questions to st10@humboldt.edu .
<html>

<!-- 
     js_funct1.html
     Playing with a JavaScript function with arguments and a return
         statement
     
     by: Sharon Tuttle
     last modified: 8-27-06
-->

<head>
    <title> js_funct1.html: Playing with a JavaScript function 
            with arguments that returns something </title>

    <script type="text/javascript">
        <!--
        function gross_wage(hours, salary)
        {
            return hours * salary
        }
        //-->
    </script>

</head>

<body>
    <h3> js_funct1.html </h3>
    <h4> (last modified 8-27-06) </h4>

    <hr>

    <script type="text/javascript">
        <!--
        var num_hrs = prompt("How many hours did you work " +
                             "this week?")
        document.write("<h2>You worked: " + num_hrs + " hours</h2>")
    
        var wage_rate = prompt("What are you paid per hour?")

        document.write("<h2>You are paid: " + wage_rate + 
                       " dollars per hour </h2>")

        document.write("<hr><h2> You are owed $" +
                       gross_wage(num_hrs, wage_rate) +
                       " this week. </h2>")
        //-->
    </script>
    <noscript> 
        <hr> 
        <h3> Your browser does not support JavaScript, or has it disabled; <br> 
             please note that, as a result, this page will not work. </h3> 
        <hr> 
    </noscript> 

    <hr>

</body>
</html>