title: How to 'output' a JavaScript variable into an HTML div
body: <p>I have a JavaScript variable and I want the HTML div to output 7.</p>
  
  <p>I know it's simple, but I can't seem to get my head around this.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;script type="text/javascript"&gt;
  
              var ball = 3+4;
          &lt;/script&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
          &lt;div&gt;Have 7 output here&lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>