title: Javascript input/checkbox program not running despite code (looking) correct
body: <p>this code won't seem to run, even though I can't find anything wrong with it. It's probably something stupid, but I'm a beginner, so please don't judge :)</p>
  <p>P.S. It's supposed to grab the user inputs and checkbox options selected, and then return the correct Chinese output (formal or informal).</p>
  <pre><code>&lt;html&gt;
  
  &lt;form&gt;
  Formal:&lt;input id=&quot;check1&quot; type=&quot;checkbox&quot;&gt;&lt;/input&gt;&lt;br&gt;
  Informal:&lt;input id=&quot;check2&quot; type=&quot;checkbox&quot;&gt;&lt;/input&gt;&lt;br&gt;
  Num. 1 Char:&lt;input id=&quot;a&quot; type=&quot;number&quot; value=&quot; &quot;&gt;&lt;/input&gt;&lt;br&gt;
  Num. 2 Char:&lt;input id=&quot;b&quot; type=&quot;number&quot; value=&quot; &quot;&gt;&lt;/input&gt;&lt;br&gt;
  Num. 3 Char:&lt;input id=&quot;c&quot; type=&quot;number&quot; value=&quot; &quot;&gt;&lt;/input&gt;&lt;br&gt;
  &lt;button onclick=&quot;myFunction&quot;&gt;Make Chinese!&lt;/button&gt;
  &lt;/form&gt;
  &lt;h1 id=&quot;answer&quot;&gt;Answer will show up here&lt;/h1&gt;
  
  &lt;script type=&quot;text/javascript&quot;&gt;
  
  let aa = (document.getElementById('a').value);
  let bb = (document.getElementById('b').value);
  let cc = (document.getElementById('c').value);
  
  
  function myFunction() {
  if (document.getElementById('check1').checked) {
  document.getElementById('answer').innerHTML = (aa+&quot;元&quot;+bb+&quot;角&quot;+cc+&quot;分&quot;);
  }else{
  document.getElementById('answer').innerHTML = (aa+&quot;块&quot;+bb+&quot;毛&quot;+cc+&quot;分&quot;);
  }
  }
  
  &lt;/script&gt;
  
  &lt;/html&gt;
  
  </code></pre>