title: Uncaught ReferenceError: document is not defined
body: <p>So I have a simple app to help a diabetic calculate some different things they would need to help regulate their blood sugar.  At the bottom of the page I want to state a few different things as a quick overview.  So when I try and pull Carbs down to my list, it doesnt work.  What do i do? Code is shown below</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE HTML&gt;
  &lt;html lang="en-us"&gt;
  
  &lt;head&gt;
    &lt;meta charset="utf-8" name="Austin" content="HTML Code and Java Script"&gt;
    &lt;title&gt;Title&lt;/title&gt;
  
    &lt;script type="text/javascript"&gt;
      function doseToEat() {
        var carbs = parseFloat(document.getElementById("carbs").value);
        var insulin = parseFloat(document.getElementById("insulinUnitPer10Carbs").value);
        var dose = carbs / (insulin * 10)
        document.getElementById("dose").innerHTML = dose;
        documnet.getElementById("carbsOutput").innerHTML = carbs;
      }
  
      function correction() {
        var currentBS = parseFloat(document.getElementById("currentBS").value);
        var correction = (currentBS - 100) / 30
        document.getElementById("correction").innerHTML = correction;
        document.getElementById("currentBSOutput").innerHTML = currentBS;
      }
    &lt;/script&gt;
  
  
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;h3&gt;This Is to help calculate and track your blood sugar.&lt;/h3&gt;
    &lt;input type="number" id="currentBS"&gt;Please Enter your current Blood Sugar.
    &lt;br&gt;
    &lt;button type="button" onclick="correction()"&gt;Calculate Correction&lt;/button&gt;
    &lt;br&gt;
    &lt;label&gt;This is your correction.&lt;/label&gt;
    &lt;div id="correction"&gt;&lt;/div&gt;
    &lt;br&gt;
    &lt;input type="number" id="carbs"&gt;How many Carbs will you be eating?
    &lt;br&gt;
    &lt;input type="number" id="insulinUnitPer10Carbs"&gt;How many Units of Insulin do you need per 10 carbs?
    &lt;br&gt;
    &lt;button type="button" onclick="doseToEat()"&gt;Calculate&lt;/button&gt;
    &lt;br&gt;
    &lt;label&gt;This Is How much Insulin you should dose&lt;/label&gt;
    &lt;div id="dose"&gt;&lt;/div&gt;
  
    &lt;output type="number" id="time"&gt;Time:&lt;/output&gt;
    &lt;br&gt;
    &lt;output type="number" id="Date"&gt;Date:&lt;/output&gt;
    &lt;br&gt;Current Blood Sugar:
    &lt;output type="number" id="currentBSOutput"&gt;&lt;/output&gt;
    &lt;br&gt;Carbs:
    &lt;output type="number" id="carbsOutput"&gt;&lt;/output&gt;
    &lt;br&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>