Declare the Function
Put a function declaration in <script>
Testing
Template
<html><head><title>My Test Page</title></head>
  <body>
    <script language="JavaScript">
function worthau ( weight )  {
// Compute the dollar value
//  of weight at $368.40/troy oz
   return weight * 12 * 368.4;
}
alert(worthau(1/12));
    </script>
  </body>
</html>