title: Output form values using Javascript
body: <p>New to JavaScript here. How do I have an output in JS that changes (when a button is pressed) based on the value of an HTML form? Here's what I have so far:</p>
  
  <pre><code>&lt;form&gt; Number: &lt;input name="num" type="number" value="20" /&gt;&lt;/form&gt;
  
  &lt;button onclick = ?????output num?????&gt; Click Me &lt;/button&gt;
  </code></pre>
  
  <p>What goes where the <code>?????output num?????</code> is? I <em>think</em> that I should be using the <code>document.getElementById(id)</code> syntax, but I'm not sure how to get that to work. Thanks!</p>