title: javascript toFixed(2) not working in calculations
body: <p>I have a bit of code that involves calculations that I'm trying to show only two decimals. I'm using .toFixed(2), but its still not working. Am I putting it in the right spot?</p>
  
  <pre><code>   function SetFoodItems(amount) {
      // returns the amount in the .99 format
      return amount == Math.floor(amount)) ? amount + '.00' : ((amount * 10 
     == Math.floor(amount * 10)) ? amount + '0';
     }
  
    function SelectFoodItems(form) {
      var UpdateCosts = (form.quantity.value - 0) * (form.unitcost.value - 
   0) + (form.quantity1.value - 0) * (form.unitcost1.value - 0) + 
  (form.quantity2.value - 0) * (form.unitcost2.value - 0) + 
  (form.quantity3.value - 0) * (form.unitcost3.value - 0).toFixed(2);
  
      UpdateCosts = Math.floor(subtotal * 1000) / 1000;
      form.subtotal.value = '$' + SetFoodItems(subtotal).toFixed(2);
  
      var tax = (UpdateCosts / 100 * (form.rate.value - 0).toFixed(2);
      tax = Math.floor(tax * 1000) / 1000;
      form.tax.value = '$' + SetFoodItems(tax);
  
      total = UpdateCosts + tax;
      total = Math.floor((total * 1000) / 1000);
     form.total.value = '$' + SetFoodItems(total).toFixed(2;
  </code></pre>