title: Javascript order total for coffee cant get function to work. PLEASE ASSIST
body: <p>Alright so heres the task for the javascript part of my homework.</p>
  
  <p>The Javascript function will: </p>
  
  <ol>
  <li>Take three parameters: a name, the drink type, and the number of extra shots </li>
  <li>Check to make sure a name was given and alert the user if there’s no name </li>
  <li>Calculate the drink price based on the type ordered </li>
  <li>Add additional costs based on the number of extra shots ordered </li>
  <li>Alert the user when the drink total has been calculated. It will inform the user of the drink ordered, number of extra shots, and the total cost of the order. </li>
  </ol>
  
  <p>Here’s information you’ll need for your programming: </p>
  
  <ol>
  <li>Available drinks and prices a. Latte = $3.00 b. Americano = $2.00 c. Cappuccino = $2.50 d. Drip coffee = $1.50 </li>
  <li>Extra espresso shots are $.50 each a. Only up to 4 extra shots can be ordered</li>
  </ol>
  
  <p>And heres my code, I cant get the javascript part I've been trying for hours now.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript"&gt; 
  function first(drink, shots, customer) { 
      var x = customer.value; 
      if (x == '' || x == 'null') { 
          alert("Yo enter a name."); 
      }
      else { 
          if (drink == "0") { 
              price = 3; 
          } else if (drink == "1") { 
              price = 2; 
          } else if (drink == "2") { 
              price = 2.50; 
          } else { 
              price = 1.50; 
          } 
          if(shots &gt; 0) { 
              Price= price + (shots * 0.5) 
          } else { 
              alert ("Thank you"); 
          } 
      }
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form&gt;
  &lt;h1&gt;Javascript calculating Function: Calculate the cost of a coffee drinks using Javascript.&lt;/h1&gt;
  &lt;p&gt;What would you like to order?&lt;/p&gt;
  
  &lt;select id="drink"&gt;
  
      &lt;option value="0" id="0"&gt;Latte&lt;/option&gt;
      &lt;option value="1" id="1"&gt;Americano&lt;/option&gt;
      &lt;option value="2" id="2"&gt;Cappuccino&lt;/option&gt;
      &lt;option value="3" id="3"&gt;Drip Coffee&lt;/option&gt;
  
  &lt;/select&gt;
  
  &lt;br&gt;
  &lt;br&gt;
  
  &lt;select id="shots"&gt;
  
      &lt;option value="0" id="0"&gt;No Extra&lt;/option&gt;
      &lt;option value="1" id="1"&gt;1&lt;/option&gt;
      &lt;option value="2" id="2"&gt;2&lt;/option&gt;
      &lt;option value="3" id="3"&gt;3&lt;/option&gt;
      &lt;option value="4" id="4"&gt;4&lt;/option&gt;
  
  &lt;/select&gt;
  
  &lt;br&gt;
  &lt;br&gt;
  
  &lt;p&gt;Enter name here:&lt;/p&gt;
  
  &lt;input id="customer" value="customer" type="text"/&gt;
  
  &lt;br&gt;
  
   &lt;br&gt;
  
      &lt;button onclick="first(drink, shots, customer)"&gt;Complete Order&lt;/button&gt;
  
      &lt;/form&gt;
      &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p>Any help is appreciated thank you in advance!</p>